summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorrdevlin.cronin@chromium.org <rdevlin.cronin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-18 19:59:12 +0000
committerrdevlin.cronin@chromium.org <rdevlin.cronin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-18 19:59:12 +0000
commitdbc165c3cc074c0f05e6789afa3f66632da045c4 (patch)
tree031eb03b575f82f029805c6910a592b7e421dc13 /chrome
parent6fb8654984e276dc98b2df689e773a8636f227f4 (diff)
downloadchromium_src-dbc165c3cc074c0f05e6789afa3f66632da045c4.zip
chromium_src-dbc165c3cc074c0f05e6789afa3f66632da045c4.tar.gz
chromium_src-dbc165c3cc074c0f05e6789afa3f66632da045c4.tar.bz2
Make ExtensionMessageBubbleControllers use Profile::GetOriginalProfile().
This prevents them from showing errors for each new incognito session which occurs. Also move the profile checking for the SettingsAPI bubble from ExtensionMessageBubbleView to SettingsApiBubbleController, to be more analogous with the other controllers. BUG=363153 Review URL: https://codereview.chromium.org/239443002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264835 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/extensions/dev_mode_bubble_controller.cc4
-rw-r--r--chrome/browser/extensions/suspicious_extension_bubble_controller.cc4
-rw-r--r--chrome/browser/ui/views/extensions/extension_message_bubble_view.cc14
3 files changed, 11 insertions, 11 deletions
diff --git a/chrome/browser/extensions/dev_mode_bubble_controller.cc b/chrome/browser/extensions/dev_mode_bubble_controller.cc
index b1dec7e..cc4448b 100644
--- a/chrome/browser/extensions/dev_mode_bubble_controller.cc
+++ b/chrome/browser/extensions/dev_mode_bubble_controller.cc
@@ -146,12 +146,12 @@ DevModeBubbleController::~DevModeBubbleController() {
}
bool DevModeBubbleController::ShouldShow() {
- return !g_shown_for_profiles.Get().count(profile_) &&
+ return !g_shown_for_profiles.Get().count(profile_->GetOriginalProfile()) &&
!GetExtensionList().empty();
}
void DevModeBubbleController::Show(ExtensionMessageBubble* bubble) {
- g_shown_for_profiles.Get().insert(profile_);
+ g_shown_for_profiles.Get().insert(profile_->GetOriginalProfile());
ExtensionMessageBubbleController::Show(bubble);
}
diff --git a/chrome/browser/extensions/suspicious_extension_bubble_controller.cc b/chrome/browser/extensions/suspicious_extension_bubble_controller.cc
index 6f40d0f..873a3cc 100644
--- a/chrome/browser/extensions/suspicious_extension_bubble_controller.cc
+++ b/chrome/browser/extensions/suspicious_extension_bubble_controller.cc
@@ -152,12 +152,12 @@ SuspiciousExtensionBubbleController::~SuspiciousExtensionBubbleController() {
}
bool SuspiciousExtensionBubbleController::ShouldShow() {
- return !g_shown_for_profiles.Get().count(profile_) &&
+ return !g_shown_for_profiles.Get().count(profile_->GetOriginalProfile()) &&
!GetExtensionList().empty();
}
void SuspiciousExtensionBubbleController::Show(ExtensionMessageBubble* bubble) {
- g_shown_for_profiles.Get().insert(profile_);
+ g_shown_for_profiles.Get().insert(profile_->GetOriginalProfile());
ExtensionMessageBubbleController::Show(bubble);
}
diff --git a/chrome/browser/ui/views/extensions/extension_message_bubble_view.cc b/chrome/browser/ui/views/extensions/extension_message_bubble_view.cc
index 2e58aae4..09a9236 100644
--- a/chrome/browser/ui/views/extensions/extension_message_bubble_view.cc
+++ b/chrome/browser/ui/views/extensions/extension_message_bubble_view.cc
@@ -285,6 +285,9 @@ ExtensionMessageBubbleFactory::~ExtensionMessageBubbleFactory() {
void ExtensionMessageBubbleFactory::MaybeShow(views::View* anchor_view) {
#if defined(OS_WIN)
+ bool is_initial_check = IsInitialProfileCheck(profile_->GetOriginalProfile());
+ RecordProfileCheck(profile_->GetOriginalProfile());
+
// The list of suspicious extensions takes priority over the dev mode bubble
// and the settings API bubble, since that needs to be shown as soon as we
// disable something. The settings API bubble is shown on first startup after
@@ -293,20 +296,17 @@ void ExtensionMessageBubbleFactory::MaybeShow(views::View* anchor_view) {
// The dev mode bubble is not time sensitive like the other two so we'll catch
// the dev mode extensions on the next startup/next window that opens. That
// way, we're not too spammy with the bubbles.
- if (!shown_suspicious_extensions_bubble_) {
- if (MaybeShowSuspiciousExtensionsBubble(anchor_view))
- return;
- }
+ if (!shown_suspicious_extensions_bubble_ &&
+ MaybeShowSuspiciousExtensionsBubble(anchor_view))
+ return;
if (!shown_startup_override_extensions_bubble_ &&
- IsInitialProfileCheck(profile_->GetOriginalProfile()) &&
+ is_initial_check &&
MaybeShowStartupOverrideExtensionsBubble(anchor_view))
return;
if (!shown_dev_mode_extensions_bubble_)
MaybeShowDevModeExtensionsBubble(anchor_view);
-
- RecordProfileCheck(profile_->GetOriginalProfile());
#endif // OS_WIN
}