Index: chrome/browser/chrome_browser_main.cc |
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc |
index e8612a18a4d7a25953c8afaf9187d781462b4dd1..d7de8e1a842d1e11d41754b513de26ce9ebbcb68 100644 |
--- a/chrome/browser/chrome_browser_main.cc |
+++ b/chrome/browser/chrome_browser_main.cc |
@@ -366,20 +366,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(); |
@@ -695,8 +681,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); |
+ UMA_HISTOGRAM_LONG_TIMES_100("Startup.BrowserMessageLoopStartTime", |
+ base::Time::Now() - process_creation_time); |
} |
#endif // defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) |
@@ -707,40 +693,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. |
@@ -1553,8 +1505,8 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { |
parameters().autorelease_pool->Recycle(); |
#endif |
- RecordPreReadExperimentTime("Startup.BrowserOpenTabs", |
- base::TimeTicks::Now() - browser_open_start); |
+ UMA_HISTOGRAM_LONG_TIMES_100("Startup.BrowserOpenTabs", |
+ base::TimeTicks::Now() - browser_open_start); |
Alexei Svitkine (slow)
2013/09/03 14:59:16
Nit: Move the second argument into a local var.
Roger McFarlane (Chromium)
2013/09/03 18:38:43
Done.
|
// If we're running tests (ui_task is non-null), then we don't want to |
// call FetchLanguageListFromTranslateServer or |