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

Unified Diff: chrome/browser/chrome_browser_main.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 | « no previous file | chrome/browser/first_run/first_run.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
===================================================================
--- chrome/browser/chrome_browser_main.cc (revision 181784)
+++ chrome/browser/chrome_browser_main.cc (working copy)
@@ -949,6 +949,19 @@
if (do_first_run_tasks_) {
AddFirstRunNewTabs(browser_creator_.get(), master_prefs_->new_tabs);
+
+ // Store the initial VariationsService seed in local state, if it exists
+ // in master prefs.
+ if (!master_prefs_->variations_seed.empty()) {
+ local_state_->SetString(prefs::kVariationsSeed,
+ master_prefs_->variations_seed);
+ // Set the variation seed date to the current system time. If the user's
+ // clock is incorrect, this may cause some field trial expiry checks to
+ // not do the right thing until the next seed update from the server,
+ // when this value will be updated.
+ local_state_->SetInt64(prefs::kVariationsSeedDate,
+ base::Time::Now().ToInternalValue());
+ }
} else if (parsed_command_line().HasSwitch(switches::kNoFirstRun)) {
// Create the First Run beacon anyways if --no-first-run was passed on the
// command line.
« no previous file with comments | « no previous file | chrome/browser/first_run/first_run.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698