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

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

Issue 12223062: Support variations_seed parameter in MasterPrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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_internal.h » ('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
===================================================================
--- chrome/browser/first_run/first_run.cc (revision 181784)
+++ chrome/browser/first_run/first_run.cc (working copy)
@@ -250,10 +250,10 @@
}
void SetupMasterPrefsFromInstallPrefs(
- MasterPrefs* out_prefs,
- installer::MasterPreferences* install_prefs) {
+ const installer::MasterPreferences& install_prefs,
+ MasterPrefs* out_prefs) {
bool value = false;
- if (install_prefs->GetBool(
+ if (install_prefs.GetBool(
installer::master_preferences::kDistroImportSearchPref, &value)) {
if (value) {
out_prefs->do_import_items |= importer::SEARCH_ENGINES;
@@ -266,12 +266,12 @@
// Otherwise, wait until the user has completed first run to set it, so the
// user is guaranteed to see the bubble iff he or she has completed the first
// run process.
- if (install_prefs->GetBool(
+ if (install_prefs.GetBool(
installer::master_preferences::kDistroSuppressFirstRunBubble,
&value) && value)
SetShowFirstRunBubblePref(FIRST_RUN_BUBBLE_SUPPRESS);
- if (install_prefs->GetBool(
+ if (install_prefs.GetBool(
installer::master_preferences::kDistroImportHistoryPref,
&value)) {
if (value) {
@@ -282,10 +282,10 @@
}
std::string not_used;
- out_prefs->homepage_defined = install_prefs->GetString(
+ out_prefs->homepage_defined = install_prefs.GetString(
prefs::kHomePage, &not_used);
- if (install_prefs->GetBool(
+ if (install_prefs.GetBool(
installer::master_preferences::kDistroImportHomePagePref,
&value)) {
if (value) {
@@ -296,7 +296,7 @@
}
// Bookmarks are never imported unless specifically turned on.
- if (install_prefs->GetBool(
+ if (install_prefs.GetBool(
installer::master_preferences::kDistroImportBookmarksPref,
&value)) {
if (value)
@@ -305,17 +305,19 @@
out_prefs->dont_import_items |= importer::FAVORITES;
}
- if (install_prefs->GetBool(
+ if (install_prefs.GetBool(
installer::master_preferences::kMakeChromeDefaultForUser,
&value) && value) {
out_prefs->make_chrome_default = true;
}
- if (install_prefs->GetBool(
+ if (install_prefs.GetBool(
installer::master_preferences::kSuppressFirstRunDefaultBrowserPrompt,
&value) && value) {
out_prefs->suppress_first_run_default_browser_prompt = true;
}
+
+ out_prefs->variations_seed = install_prefs.GetVariationsSeed();
}
void SetDefaultBrowser(installer::MasterPreferences* install_prefs){
@@ -595,8 +597,7 @@
DoDelayedInstallExtensionsIfNeeded(install_prefs.get());
- internal::SetupMasterPrefsFromInstallPrefs(out_prefs,
- install_prefs.get());
+ internal::SetupMasterPrefsFromInstallPrefs(*install_prefs, out_prefs);
internal::SetImportPreferencesAndLaunchImport(out_prefs, install_prefs.get());
internal::SetDefaultBrowser(install_prefs.get());
« no previous file with comments | « chrome/browser/first_run/first_run.h ('k') | chrome/browser/first_run/first_run_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698