-
Notifications
You must be signed in to change notification settings - Fork 888
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #11444: Google accounts should not show in the profile menu
- Loading branch information
Showing
7 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* Copyright (c) 2020 The Brave Authors. All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "brave/browser/profiles/brave_gaia_info_update_service.h" | ||
|
||
#include "base/files/file_path.h" | ||
#include "chrome/browser/profiles/profile.h" | ||
#include "chrome/browser/profiles/profile_attributes_storage.h" | ||
#include "components/prefs/pref_service.h" | ||
#include "components/signin/public/identity_manager/identity_manager.h" | ||
|
||
BraveGAIAInfoUpdateService::BraveGAIAInfoUpdateService( | ||
signin::IdentityManager* identity_manager, | ||
ProfileAttributesStorage* profile_attributes_storage, | ||
const base::FilePath& profile_path, | ||
PrefService* prefs) | ||
: GAIAInfoUpdateService(identity_manager, | ||
profile_attributes_storage, | ||
profile_path, | ||
prefs) {} | ||
|
||
BraveGAIAInfoUpdateService::~BraveGAIAInfoUpdateService() {} | ||
|
||
// static | ||
bool BraveGAIAInfoUpdateService::ShouldUseGAIAProfileInfo(Profile* profile) { | ||
return false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* Copyright (c) 2020 The Brave Authors. All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#ifndef BRAVE_BROWSER_PROFILES_BRAVE_GAIA_INFO_UPDATE_SERVICE_H_ | ||
#define BRAVE_BROWSER_PROFILES_BRAVE_GAIA_INFO_UPDATE_SERVICE_H_ | ||
|
||
#include "chrome/browser/profiles/gaia_info_update_service.h" | ||
|
||
class PrefService; | ||
class Profile; | ||
class ProfileAttributesStorage; | ||
|
||
namespace base { | ||
class FilePath; | ||
} | ||
namespace signin { | ||
class IdentityManager; | ||
} | ||
|
||
class BraveGAIAInfoUpdateService : public GAIAInfoUpdateService { | ||
public: | ||
BraveGAIAInfoUpdateService( | ||
signin::IdentityManager* identity_manager, | ||
ProfileAttributesStorage* profile_attributes_storage, | ||
const base::FilePath& profile_path, | ||
PrefService* prefs); | ||
|
||
~BraveGAIAInfoUpdateService() override; | ||
|
||
// Checks if downloading GAIA info for the given profile is allowed. | ||
static bool ShouldUseGAIAProfileInfo(Profile* profile); | ||
}; | ||
|
||
#endif // BRAVE_BROWSER_PROFILES_BRAVE_GAIA_INFO_UPDATE_SERVICE_H_ |
7 changes: 7 additions & 0 deletions
7
chromium_src/chrome/browser/profiles/gaia_info_update_service.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* Copyright (c) 2020 The Brave Authors. All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "brave/browser/profiles/brave_gaia_info_update_service.cc" | ||
#include "../../../../../chrome/browser/profiles/gaia_info_update_service.cc" |
10 changes: 10 additions & 0 deletions
10
chromium_src/chrome/browser/profiles/gaia_info_update_service_factory.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* Copyright (c) 2020 The Brave Authors. All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "brave/browser/profiles/brave_gaia_info_update_service.h" | ||
|
||
#define GAIAInfoUpdateService BraveGAIAInfoUpdateService | ||
#include "../../../../../chrome/browser/profiles/gaia_info_update_service_factory.cc" | ||
#undef GAIAInfoUpdateService |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters