Index: chrome/browser/chrome_browser_main.cc |
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc |
index fbbff83d72d2001e69c48ecff27f601ecf7a82f6..255a2b2c88a4467b0c560b573d10fa2f7b7c0e83 100644 |
--- a/chrome/browser/chrome_browser_main.cc |
+++ b/chrome/browser/chrome_browser_main.cc |
@@ -365,20 +365,6 @@ OSStatus KeychainCallback(SecKeychainEvent keychain_event, |
} |
#endif |
-// This code is specific to the Windows-only PreReadExperiment field-trial. |
-void AddPreReadHistogramTime(const char* name, base::TimeDelta time) { |
- const base::TimeDelta kMin(base::TimeDelta::FromMilliseconds(1)); |
- const base::TimeDelta kMax(base::TimeDelta::FromHours(1)); |
- static const size_t kBuckets(100); |
- |
- // FactoryTimeGet will always return a pointer to the same histogram object, |
- // keyed on its name. There's no need for us to store it explicitly anywhere. |
- base::HistogramBase* counter = base::Histogram::FactoryTimeGet( |
- name, kMin, kMax, kBuckets, base::Histogram::kUmaTargetedHistogramFlag); |
- |
- counter->AddTime(time); |
-} |
- |
void RegisterComponentsForUpdate(const CommandLine& command_line) { |
ComponentUpdateService* cus = g_browser_process->component_updater(); |
@@ -702,8 +688,8 @@ void ChromeBrowserMainParts::RecordBrowserStartupTime() { |
base::CurrentProcessInfo::CreationTime(); |
if (!is_first_run && !process_creation_time.is_null()) { |
- RecordPreReadExperimentTime("Startup.BrowserMessageLoopStartTime", |
- base::Time::Now() - process_creation_time); |
+ base::TimeDelta delay = base::Time::Now() - process_creation_time; |
+ UMA_HISTOGRAM_LONG_TIMES_100("Startup.BrowserMessageLoopStartTime", delay); |
} |
#endif // defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) |
@@ -714,40 +700,6 @@ void ChromeBrowserMainParts::RecordBrowserStartupTime() { |
new LoadCompleteListener(); |
} |
-// This code is specific to the Windows-only PreReadExperiment field-trial. |
-void ChromeBrowserMainParts::RecordPreReadExperimentTime(const char* name, |
- base::TimeDelta time) { |
- DCHECK(name != NULL); |
- |
- // This gets called with different histogram names, so we don't want to use |
- // the UMA_HISTOGRAM_CUSTOM_TIMES macro--it uses a static variable, and the |
- // first call wins. |
- AddPreReadHistogramTime(name, time); |
- |
-#if defined(OS_WIN) |
-#if defined(GOOGLE_CHROME_BUILD) |
- // The pre-read experiment is Windows and Google Chrome specific. |
- scoped_ptr<base::Environment> env(base::Environment::Create()); |
- |
- // Only record the sub-histogram result if the experiment is running |
- // (environment variable is set, and valid). |
- std::string pre_read_percentage; |
- if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read_percentage)) { |
- std::string uma_name(name); |
- |
- // We want XP to record a separate histogram, as the loader on XP |
- // is very different from the Vista and Win7 loaders. |
- if (base::win::GetVersion() <= base::win::VERSION_XP) |
- uma_name += "_XP"; |
- |
- uma_name += "_PreRead_"; |
- uma_name += pre_read_percentage; |
- AddPreReadHistogramTime(uma_name.c_str(), time); |
- } |
-#endif |
-#endif |
-} |
- |
// ----------------------------------------------------------------------------- |
// TODO(viettrungluu): move more/rest of BrowserMain() into BrowserMainParts. |
@@ -1540,8 +1492,8 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { |
parameters().autorelease_pool->Recycle(); |
#endif |
- RecordPreReadExperimentTime("Startup.BrowserOpenTabs", |
- base::TimeTicks::Now() - browser_open_start); |
+ base::TimeDelta delay = base::TimeTicks::Now() - browser_open_start; |
+ UMA_HISTOGRAM_LONG_TIMES_100("Startup.BrowserOpenTabs", delay); |
// If we're running tests (ui_task is non-null), then we don't want to |
// call FetchLanguageListFromTranslateServer or |