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

Unified Diff: chrome/browser/ui/browser.cc

Issue 9016036: Implement the new first run bubble, clean up old bubbles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and merge, fix SetShowFirstRunBubblePref and test, update copyright years. Created 8 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
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 234af50203739a0cd5da2720d221730efc067a7d..083673e328e96306eda33cfa9928519f8e3deda4 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -5380,31 +5380,17 @@ void Browser::OnWindowDidShow() {
bool is_showing_promo = contents &&
contents->GetURL().SchemeIs(chrome::kChromeUIScheme) &&
contents->GetURL().host() == chrome::kChromeUISyncPromoHost;
-
- // Show the First Run information bubble if we've been told to.
PrefService* local_state = g_browser_process->local_state();
if (!is_showing_promo && local_state &&
local_state->GetBoolean(prefs::kShouldShowFirstRunBubble)) {
- FirstRun::BubbleType bubble_type = FirstRun::MINIMAL_BUBBLE;
- if (local_state->
- FindPreference(prefs::kShouldUseOEMFirstRunBubble) &&
- local_state->GetBoolean(prefs::kShouldUseOEMFirstRunBubble)) {
- bubble_type = FirstRun::OEM_BUBBLE;
- } else if (local_state->
- FindPreference(prefs::kShouldUseMinimalFirstRunBubble) &&
- local_state->GetBoolean(prefs::kShouldUseMinimalFirstRunBubble)) {
- bubble_type = FirstRun::MINIMAL_BUBBLE;
- }
- // Reset the preference so we don't show the bubble for subsequent
- // windows.
+ // Reset the preference to avoid showing the bubble for subsequent windows.
local_state->SetBoolean(prefs::kShouldShowFirstRunBubble, false);
- window_->GetLocationBar()->ShowFirstRunBubble(bubble_type);
+ window_->GetLocationBar()->ShowFirstRunBubble();
} else {
GlobalErrorService* service =
GlobalErrorServiceFactory::GetForProfile(profile());
GlobalError* error = service->GetFirstGlobalErrorWithBubbleView();
- if (error) {
+ if (error)
error->ShowBubbleView(this);
- }
}
}

Powered by Google App Engine
This is Rietveld 408576698