OLD | NEW |
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 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 bool ret = base::FieldTrialList::CreateTrialsFromString(persistent); | 673 bool ret = base::FieldTrialList::CreateTrialsFromString(persistent); |
674 CHECK(ret) << "Invalid --" << switches::kForceFieldTrials << | 674 CHECK(ret) << "Invalid --" << switches::kForceFieldTrials << |
675 " list specified."; | 675 " list specified."; |
676 } | 676 } |
677 | 677 |
678 chrome_variations::VariationsService* variations_service = | 678 chrome_variations::VariationsService* variations_service = |
679 browser_process_->variations_service(); | 679 browser_process_->variations_service(); |
680 if (variations_service) | 680 if (variations_service) |
681 variations_service->CreateTrialsFromSeed(); | 681 variations_service->CreateTrialsFromSeed(); |
682 | 682 |
683 const int64 install_date = local_state_->GetInt64(prefs::kInstallDate); | 683 // This must be called after the local state is initialized. |
684 // This must be called after the pref is initialized. | 684 browser_field_trials_.SetupFieldTrials(local_state_); |
685 DCHECK(install_date); | |
686 browser_field_trials_.SetupFieldTrials(base::Time::FromTimeT(install_date)); | |
687 | 685 |
688 SetupPlatformFieldTrials(); | 686 SetupPlatformFieldTrials(); |
689 | 687 |
690 // Initialize FieldTrialSynchronizer system. This is a singleton and is used | 688 // Initialize FieldTrialSynchronizer system. This is a singleton and is used |
691 // for posting tasks via base::Bind. Its deleted when it goes out of scope. | 689 // for posting tasks via base::Bind. Its deleted when it goes out of scope. |
692 // Even though base::Bind does AddRef and Release, the object will not be | 690 // Even though base::Bind does AddRef and Release, the object will not be |
693 // deleted after the Task is executed. | 691 // deleted after the Task is executed. |
694 field_trial_synchronizer_ = new FieldTrialSynchronizer(); | 692 field_trial_synchronizer_ = new FieldTrialSynchronizer(); |
695 } | 693 } |
696 | 694 |
(...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1814 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1812 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1815 uma_name += "_XP"; | 1813 uma_name += "_XP"; |
1816 | 1814 |
1817 uma_name += "_PreRead_"; | 1815 uma_name += "_PreRead_"; |
1818 uma_name += pre_read_percentage; | 1816 uma_name += pre_read_percentage; |
1819 AddPreReadHistogramTime(uma_name.c_str(), time); | 1817 AddPreReadHistogramTime(uma_name.c_str(), time); |
1820 } | 1818 } |
1821 #endif | 1819 #endif |
1822 #endif | 1820 #endif |
1823 } | 1821 } |
OLD | NEW |