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

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 11363062: Create a new-installs-only uniformity trial. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Change start date to Nov 6 Created 8 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/chrome_browser_field_trials.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 switches::kForceFieldTrials); 568 switches::kForceFieldTrials);
569 bool ret = base::FieldTrialList::CreateTrialsFromString(persistent); 569 bool ret = base::FieldTrialList::CreateTrialsFromString(persistent);
570 CHECK(ret) << "Invalid --" << switches::kForceFieldTrials << 570 CHECK(ret) << "Invalid --" << switches::kForceFieldTrials <<
571 " list specified."; 571 " list specified.";
572 } 572 }
573 573
574 chrome_variations::VariationsService* variations_service = 574 chrome_variations::VariationsService* variations_service =
575 browser_process_->variations_service(); 575 browser_process_->variations_service();
576 variations_service->CreateTrialsFromSeed(browser_process_->local_state()); 576 variations_service->CreateTrialsFromSeed(browser_process_->local_state());
577 577
578 browser_field_trials_.SetupFieldTrials(); 578 const int64 install_date = local_state_->GetInt64(
579 prefs::kUninstallMetricsInstallDate);
580 // This must be called after the pref is initialized.
581 DCHECK(install_date);
582 browser_field_trials_.SetupFieldTrials(base::Time::FromTimeT(install_date));
579 583
580 SetupPlatformFieldTrials(); 584 SetupPlatformFieldTrials();
581 585
582 // Initialize FieldTrialSynchronizer system. This is a singleton and is used 586 // Initialize FieldTrialSynchronizer system. This is a singleton and is used
583 // for posting tasks via base::Bind. Its deleted when it goes out of scope. 587 // for posting tasks via base::Bind. Its deleted when it goes out of scope.
584 // Even though base::Bind does AddRef and Release, the object will not be 588 // Even though base::Bind does AddRef and Release, the object will not be
585 // deleted after the Task is executed. 589 // deleted after the Task is executed.
586 field_trial_synchronizer_ = new FieldTrialSynchronizer(); 590 field_trial_synchronizer_ = new FieldTrialSynchronizer();
587 } 591 }
588 592
(...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after
1684 if (base::win::GetVersion() <= base::win::VERSION_XP) 1688 if (base::win::GetVersion() <= base::win::VERSION_XP)
1685 uma_name += "_XP"; 1689 uma_name += "_XP";
1686 1690
1687 uma_name += "_PreRead_"; 1691 uma_name += "_PreRead_";
1688 uma_name += pre_read_percentage; 1692 uma_name += pre_read_percentage;
1689 AddPreReadHistogramTime(uma_name.c_str(), time); 1693 AddPreReadHistogramTime(uma_name.c_str(), time);
1690 } 1694 }
1691 #endif 1695 #endif
1692 #endif 1696 #endif
1693 } 1697 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_field_trials.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698