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

Unified Diff: chrome/browser/first_run/first_run.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/first_run/first_run.cc
diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc
index 2a3ef509132475acedddfdc96b65ef3b44f84968..c51e12b1986caec34ed1e8a495577e380379017c 100644
--- a/chrome/browser/first_run/first_run.cc
+++ b/chrome/browser/first_run/first_run.cc
@@ -238,15 +238,11 @@ void AutoImportPlatformCommon(
if (make_chrome_default)
ShellIntegration::SetAsDefaultBrowser();
- // Don't display the minimal bubble if there is no default search provider.
- TemplateURLService* search_engines_model =
+ // Display the first run bubble if there is a default search provider.
+ TemplateURLService* template_url =
TemplateURLServiceFactory::GetForProfile(profile);
- if (search_engines_model &&
- search_engines_model->GetDefaultSearchProvider()) {
+ if (template_url && template_url->GetDefaultSearchProvider())
SetShowFirstRunBubblePref(true);
- // Set the first run bubble to minimal.
- SetMinimalFirstRunBubblePref();
- }
SetShowWelcomePagePref();
SetPersonalDataManagerFirstRunPref();
}
@@ -300,20 +296,7 @@ bool SetShowFirstRunBubblePref(bool show_bubble) {
PrefService* local_state = g_browser_process->local_state();
if (!local_state)
return false;
- if (!local_state->HasPrefPath(prefs::kShouldShowFirstRunBubble))
- local_state->SetBoolean(prefs::kShouldShowFirstRunBubble, show_bubble);
- return true;
-}
-
-bool SetMinimalFirstRunBubblePref() {
- PrefService* local_state = g_browser_process->local_state();
- if (!local_state)
- return false;
- if (!local_state->FindPreference(prefs::kShouldUseMinimalFirstRunBubble)) {
- local_state->RegisterBooleanPref(prefs::kShouldUseMinimalFirstRunBubble,
- false);
- local_state->SetBoolean(prefs::kShouldUseMinimalFirstRunBubble, true);
- }
+ local_state->SetBoolean(prefs::kShouldShowFirstRunBubble, show_bubble);
return true;
}
@@ -412,11 +395,6 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir,
}
#endif
- if (prefs.GetBool(installer::master_preferences::kAltFirstRunBubble,
- &value) && value) {
- FirstRun::SetOEMFirstRunBubblePref();
- }
-
FilePath user_prefs = GetDefaultPrefFilePath(true, user_data_dir);
if (user_prefs.empty())
return true;
@@ -596,15 +574,3 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir,
bool FirstRun::ShouldShowSearchEngineSelector(const TemplateURLService* model) {
return model && !model->is_default_search_managed();
}
-
-// static
-bool FirstRun::SetOEMFirstRunBubblePref() {
- PrefService* local_state = g_browser_process->local_state();
- if (!local_state)
- return false;
- if (!local_state->FindPreference(prefs::kShouldUseOEMFirstRunBubble)) {
- local_state->RegisterBooleanPref(prefs::kShouldUseOEMFirstRunBubble, false);
- local_state->SetBoolean(prefs::kShouldUseOEMFirstRunBubble, true);
- }
- return true;
-}

Powered by Google App Engine
This is Rietveld 408576698