Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Unified Diff: chrome/browser/profile_resetter/automatic_profile_resetter_delegate.cc

Issue 841163002: MacViews: Fix duplicate ShowSessionCrashBubble and ShowProfileResetBubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@keybinding
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/profile_resetter/profile_reset_global_error.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profile_resetter/automatic_profile_resetter_delegate.cc
diff --git a/chrome/browser/profile_resetter/automatic_profile_resetter_delegate.cc b/chrome/browser/profile_resetter/automatic_profile_resetter_delegate.cc
index 3f1c3c7b9ef1f8667530aea20523a673ff247e16..02948a385a43c68a76dc5a4ba5bb4ec29e3d94d3 100644
--- a/chrome/browser/profile_resetter/automatic_profile_resetter_delegate.cc
+++ b/chrome/browser/profile_resetter/automatic_profile_resetter_delegate.cc
@@ -268,7 +268,9 @@ scoped_ptr<base::ListValue> AutomaticProfileResetterDelegateImpl::
bool AutomaticProfileResetterDelegateImpl::TriggerPrompt() {
DCHECK(global_error_service_);
- if (!ProfileResetGlobalError::IsSupportedOnPlatform())
+ Browser* browser = chrome::FindTabbedBrowser(
+ profile_, false /*match_original_profiles*/, chrome::GetActiveDesktop());
+ if (!browser || !ProfileResetGlobalError::IsSupportedOnPlatform(browser))
return false;
ProfileResetGlobalError* global_error = new ProfileResetGlobalError(profile_);
@@ -282,14 +284,8 @@ bool AutomaticProfileResetterDelegateImpl::TriggerPrompt() {
if ((*it)->GetBubbleView())
break;
}
- if (it == global_errors.end()) {
- Browser* browser = chrome::FindTabbedBrowser(
- profile_,
- false /*match_original_profiles*/,
- chrome::GetActiveDesktop());
- if (browser)
- global_error->ShowBubbleView(browser);
- }
+ if (it == global_errors.end())
+ global_error->ShowBubbleView(browser);
return true;
}
« no previous file with comments | « no previous file | chrome/browser/profile_resetter/profile_reset_global_error.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698