-
Notifications
You must be signed in to change notification settings - Fork 888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #11444: Google accounts should not show in the profile menu #6516
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,7 +78,8 @@ Polymer({ | |
this.browserProxy_.setIPFSCompanionEnabled(this.$.ipfsCompanionEnabled.checked); | ||
}, | ||
|
||
restartBrowser_: function() { | ||
restartBrowser_: function(e) { | ||
e.stopPropagation(); | ||
window.open("chrome://restart", "_self"); | ||
}, | ||
|
||
|
@@ -101,5 +102,10 @@ Polymer({ | |
openWebStoreUrl_: function() { | ||
window.open(loadTimeData.getString('getMoreExtensionsUrl')); | ||
}, | ||
|
||
shouldShowRestartForGoogleLogin_: function(value) { | ||
return this.browserProxy_.wasSignInEnabledAtStartup() != value; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: this doesn't need to be either a function (since it's static) or something from browserProxy (since this component can access |
||
}, | ||
|
||
}); | ||
})(); |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,34 +7,5 @@ | |
* social blocking options | ||
*/ | ||
Polymer({ | ||
is: 'settings-social-blocking-page', | ||
|
||
properties: {}, | ||
|
||
/** @private {?settings.SocialBlockingPageProxy} */ | ||
browserProxy_: null, | ||
|
||
/** @override */ | ||
created: function() { | ||
this.browserProxy_ = settings.SocialBlockingPageProxyImpl.getInstance(); | ||
}, | ||
|
||
/** @override */ | ||
ready: function() { | ||
this.shouldShowRestart_ = this.shouldShowRestart_.bind(this) | ||
this.restartBrowser_ = this.restartBrowser_.bind(this) | ||
}, | ||
|
||
shouldShowRestart_: function(value) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jumde this function and There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. checking |
||
return this.browserProxy_.wasSignInEnabledAtStartup() != value; | ||
}, | ||
|
||
setSignInEnabledAtNextStartup_: function() { | ||
this.browserProxy_.setSignInEnabledAtNextStartup(this.$.googleLoginControlType.checked); | ||
}, | ||
|
||
restartBrowser_: function(e) { | ||
e.stopPropagation(); | ||
window.open("chrome://restart", "_self"); | ||
}, | ||
is: 'settings-social-blocking-page' | ||
}); |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,10 +9,16 @@ | |
#include <utility> | ||
|
||
#include "brave/browser/profiles/profile_util.h" | ||
#include "chrome/app/vector_icons/vector_icons.h" | ||
#include "chrome/browser/browser_process.h" | ||
#include "chrome/browser/profiles/profile.h" | ||
#include "chrome/browser/profiles/profile_attributes_entry.h" | ||
#include "chrome/browser/profiles/profile_manager.h" | ||
#include "chrome/browser/profiles/profile_window.h" | ||
#include "chrome/browser/ui/browser_finder.h" | ||
#include "chrome/grit/generated_resources.h" | ||
#include "components/vector_icons/vector_icons.h" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are there existing deps for this and ui/base? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
#include "ui/base/l10n/l10n_util.h" | ||
|
||
void BraveProfileMenuView::BuildIdentity() { | ||
ProfileMenuView::BuildIdentity(); | ||
|
@@ -33,6 +39,22 @@ void BraveProfileMenuView::BuildAutofillButtons() {} | |
// We don't want to show any Chromium sync info. | ||
void BraveProfileMenuView::BuildSyncInfo() {} | ||
|
||
// We don't want feature buttons to manage google account | ||
void BraveProfileMenuView::BuildFeatureButtons() { | ||
Profile* profile = browser()->profile(); | ||
int window_count = chrome::GetBrowserCount(profile); | ||
if (!profile->IsOffTheRecord() && profile->HasPrimaryOTRProfile()) | ||
window_count += chrome::GetBrowserCount(profile->GetPrimaryOTRProfile()); | ||
if (window_count > 1) { | ||
AddFeatureButton( | ||
l10n_util::GetPluralStringFUTF16(IDS_PROFILES_CLOSE_X_WINDOWS_BUTTON, | ||
window_count), | ||
base::BindRepeating(&ProfileMenuView::OnExitProfileButtonClicked, | ||
base::Unretained(this)), | ||
vector_icons::kCloseIcon); | ||
} | ||
} | ||
|
||
gfx::ImageSkia BraveProfileMenuView::GetSyncIcon() const { | ||
// We don't need sync overlay. | ||
return gfx::ImageSkia(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* 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 "chrome/browser/profiles/gaia_info_update_service.h" | ||
|
||
#define ShouldUseGAIAProfileInfo ShouldUseGAIAProfileInfo_ChromiumImpl | ||
#include "../../../../../chrome/browser/profiles/gaia_info_update_service.cc" | ||
#undef ShouldUseGAIAProfileInfo | ||
|
||
// static | ||
bool GAIAInfoUpdateService::ShouldUseGAIAProfileInfo(Profile* profile) { | ||
return false; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* 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_CHROMIUM_SRC_CHROME_BROWSER_PROFILES_GAIA_INFO_UPDATE_SERVICE_H_ | ||
#define BRAVE_CHROMIUM_SRC_CHROME_BROWSER_PROFILES_GAIA_INFO_UPDATE_SERVICE_H_ | ||
|
||
#define ShouldUseGAIAProfileInfo \ | ||
ShouldUseGAIAProfileInfo_ChromiumImpl(Profile* profile); \ | ||
static bool ShouldUseGAIAProfileInfo | ||
#include "../../../../../chrome/browser/profiles/gaia_info_update_service.h" | ||
#undef ShouldUseGAIAProfileInfo | ||
|
||
#endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_PROFILES_GAIA_INFO_UPDATE_SERVICE_H_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit (see related): doesn't need to be in proxy since not sending any data