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

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. 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 70e90f2a4a9f27a6f0b28650dd690f14e2d606fe..5af3b0a8d51733a018ce11abef48226b0b4b483a 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -5469,31 +5469,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);
- }
}
}
« no previous file with comments | « chrome/browser/first_run/first_run_browsertest.cc ('k') | chrome/browser/ui/cocoa/first_run_bubble_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698