summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorchrisha@chromium.org <chrisha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-20 04:35:42 +0000
committerchrisha@chromium.org <chrisha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-20 04:35:42 +0000
commit8e5d5183339a4ed9869db83069ea8f40a6e7dab2 (patch)
tree08afa5eb193d691a2cec77c89872c133c1a00b70 /chrome/browser
parent555c2727afde2f81734a499ca98934e22b2045dc (diff)
downloadchromium_src-8e5d5183339a4ed9869db83069ea8f40a6e7dab2.zip
chromium_src-8e5d5183339a4ed9869db83069ea8f40a6e7dab2.tar.gz
chromium_src-8e5d5183339a4ed9869db83069ea8f40a6e7dab2.tar.bz2
Roll back PreRead experiment
This CL removes the pre-read experiment introduced in revision 95579. http://src.chromium.org/viewvc/chrome?view=rev&revision=95579 BUG=none TEST=none Review URL: http://codereview.chromium.org/7690007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97556 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/browser_main.cc51
-rw-r--r--chrome/browser/browser_main.h7
-rw-r--r--chrome/browser/browser_main_win.cc7
3 files changed, 11 insertions, 54 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index be43c54..34a18d7 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -165,7 +165,6 @@
#include <commctrl.h>
#include <shellapi.h>
-#include "base/environment.h" // For PreRead experiment.
#include "base/win/scoped_com_initializer.h"
#include "base/win/windows_version.h"
#include "chrome/browser/browser_trial.h"
@@ -784,20 +783,6 @@ void SetSocketReusePolicy(int warmest_socket_trial_group,
net::SetSocketReusePolicy(result - socket_policy);
}
-// 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::Histogram* counter = base::Histogram::FactoryTimeGet(
- name, kMin, kMax, kBuckets, base::Histogram::kUmaTargetedHistogramFlag);
-
- counter->AddTime(time);
-}
-
#if defined(USE_LINUX_BREAKPAD)
bool IsCrashReportingEnabled(const PrefService* local_state) {
// Check whether we should initialize the crash reporter. It may be disabled
@@ -2061,8 +2046,12 @@ int BrowserMain(const MainFunctionParams& parameters) {
if (pool)
pool->Recycle();
- RecordPreReadExperimentTime("Startup.BrowserOpenTabs",
- base::TimeTicks::Now() - browser_open_start);
+ UMA_HISTOGRAM_CUSTOM_TIMES(
+ "Startup.BrowserOpenTabs",
+ base::TimeTicks::Now() - browser_open_start,
+ base::TimeDelta::FromMilliseconds(1),
+ base::TimeDelta::FromHours(1),
+ 100);
// TODO(mad): Move this call in a proper place on CrOS.
// http://crosbug.com/17687
@@ -2157,31 +2146,3 @@ int BrowserMain(const MainFunctionParams& parameters) {
TRACE_EVENT_END_ETW("BrowserMain", 0, 0);
return result_code;
}
-
-// This code is specific to the Windows-only PreReadExperiment field-trial.
-void 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)
- static const char kEnvVar[] = "CHROME_PRE_READ_EXPERIMENT";
-
- // The pre-read experiment is Windows specific.
- scoped_ptr<base::Environment> env(base::Environment::Create());
- DCHECK(env.get() != NULL);
-
- // Only record the sub-histogram result if the experiment is running
- // (environment variable is set, and valid).
- std::string pre_read;
- if (env->GetVar(kEnvVar, &pre_read) && (pre_read == "0" || pre_read == "1")) {
- std::string uma_name(name);
- uma_name += "_PreRead";
- uma_name += pre_read == "1" ? "Enabled" : "Disabled";
- AddPreReadHistogramTime(uma_name.c_str(), time);
- }
-#endif
-}
diff --git a/chrome/browser/browser_main.h b/chrome/browser/browser_main.h
index e4c1da21..c589a91 100644
--- a/chrome/browser/browser_main.h
+++ b/chrome/browser/browser_main.h
@@ -213,11 +213,4 @@ void ShowMissingLocaleMessageBox();
// the UMA histogram |metric_name|.
void RecordBrowserStartupTime();
-// Records a Startup category value to an UMA histogram in the context of the
-// PreReadExperiment field-trial. This will also report to the appropriate
-// Startup.HistogramName_PreRead(Enabled|Disabled) histogram as appropriate.
-// This is only called from OS_WIN specific code, so the implementation is
-// in browser_main_win.cc. This is a Windows specific experiment.
-void RecordPreReadExperimentTime(const char* name, base::TimeDelta time);
-
#endif // CHROME_BROWSER_BROWSER_MAIN_H_
diff --git a/chrome/browser/browser_main_win.cc b/chrome/browser/browser_main_win.cc
index 0d1306e..f4e971b 100644
--- a/chrome/browser/browser_main_win.cc
+++ b/chrome/browser/browser_main_win.cc
@@ -96,9 +96,12 @@ void RecordBrowserStartupTime() {
::GetProcessTimes(::GetCurrentProcess(), &creation_time, &ignore, &ignore,
&ignore);
- RecordPreReadExperimentTime(
+ UMA_HISTOGRAM_CUSTOM_TIMES(
"Startup.BrowserMessageLoopStartTime",
- base::Time::Now() - base::Time::FromFileTime(creation_time));
+ base::Time::Now() - base::Time::FromFileTime(creation_time),
+ base::TimeDelta::FromMilliseconds(1),
+ base::TimeDelta::FromHours(1),
+ 100);
}
int AskForUninstallConfirmation() {