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

Unified Diff: chrome/browser/browser_main.cc

Issue 7508034: Make a pre-read A/B field-trial (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/browser_main.cc
===================================================================
--- chrome/browser/browser_main.cc (revision 95298)
+++ chrome/browser/browser_main.cc (working copy)
@@ -165,6 +165,7 @@
#include <commctrl.h>
#include <shellapi.h>
+#include "base/win/registry.h" // For PreReadExperiment field-trial.
#include "base/win/scoped_com_initializer.h"
#include "base/win/windows_version.h"
#include "chrome/browser/browser_trial.h"
@@ -2026,9 +2027,26 @@
if (pool)
pool->Recycle();
+ base::TimeDelta elapsed_from_browser_open_start =
+ base::TimeTicks::Now() - browser_open_start;
UMA_HISTOGRAM_MEDIUM_TIMES("Startup.BrowserOpenTabs",
- base::TimeTicks::Now() - browser_open_start);
+ elapsed_from_browser_open_start);
+#if defined(OS_WIN)
+ // On Windows, use the result of the PreReadExperiment coin-toss to
+ // output a sub-histogram.
+ base::win::RegKey key(HKEY_CURRENT_USER, L"Software\\Google\\ChromeFrame",
Sigurður Ásgeirsson 2011/08/04 13:35:32 as we discussed, we'd want to test the PreRead key
chrisha 2011/08/04 14:48:40 As we discussed, there's the potential for an impe
+ KEY_QUERY_VALUE);
+ DWORD pre_read = 1;
+ const char* uma_name =
+ "Startup.BrowserOpenTabs_PreReadEnabled";
+ if (key.Valid())
+ key.ReadValueDW(L"PreReadExperiment", &pre_read);
+ if (pre_read == 0)
+ uma_name = "Startup.BrowserOpenTabs_PreReadDisabled";
jar (doing other things) 2011/08/03 21:24:34 personal style nit: This logic is correct and OK.
chrisha 2011/08/04 14:48:40 Done.
+ UMA_HISTOGRAM_MEDIUM_TIMES(uma_name, elapsed_from_browser_open_start);
jar (doing other things) 2011/08/03 21:24:34 When performing detailed experiments, I've often f
chrisha 2011/08/04 14:48:40 Done.
+#endif
+
// TODO(mad): Move this call in a proper place on CrOS.
// http://crosbug.com/17687
#if !defined(OS_CHROMEOS)

Powered by Google App Engine
This is Rietveld 408576698