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

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. 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
« no previous file with comments | « chrome/browser/first_run/first_run.h ('k') | chrome/browser/first_run/first_run_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c0bad3727f461f3610e56fb03f6841483a8708d9..27e9b34539c65f9c4d905b054097a2b5bb9eb7d3 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;
}
@@ -341,17 +324,6 @@ bool SetPersonalDataManagerFirstRunPref() {
return true;
}
-bool 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;
-}
-
bool ShouldShowSearchEngineSelector(const TemplateURLService* model) {
return model && !model->is_default_search_managed();
}
@@ -427,11 +399,6 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir,
}
#endif
- if (prefs.GetBool(installer::master_preferences::kAltFirstRunBubble,
- &value) && value) {
- first_run::SetOEMFirstRunBubblePref();
- }
-
FilePath user_prefs = GetDefaultPrefFilePath(true, user_data_dir);
if (user_prefs.empty())
return true;
« no previous file with comments | « chrome/browser/first_run/first_run.h ('k') | chrome/browser/first_run/first_run_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698