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

Unified Diff: chrome/browser/browser_main_win.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
« chrome/browser/browser_main.cc ('K') | « chrome/browser/browser_main.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_main_win.cc
===================================================================
--- chrome/browser/browser_main_win.cc (revision 95298)
+++ chrome/browser/browser_main_win.cc (working copy)
@@ -17,6 +17,7 @@
#include "base/path_service.h"
#include "base/scoped_native_library.h"
#include "base/utf_string_conversions.h"
+#include "base/win/registry.h" // For PreReadExperiment field-trial.
#include "base/win/windows_version.h"
#include "base/win/wrapped_window_proc.h"
#include "chrome/browser/browser_util_win.h"
@@ -96,6 +97,17 @@
// Record the time to present in a histogram.
UMA_HISTOGRAM_MEDIUM_TIMES("Startup.BrowserMessageLoopStartTime",
elapsed_from_startup);
+
+ // Create a sub-histogram based on the PreReadExperiment coin-toss.
+ base::win::RegKey key(HKEY_CURRENT_USER, L"Software\\Google\\ChromeFrame",
Sigurður Ásgeirsson 2011/08/04 13:35:32 ditto: is there a good common place to put this re
chrisha 2011/08/04 14:48:40 I moved the common functionality to a function dec
+ KEY_QUERY_VALUE);
+ DWORD pre_read = 1;
+ const char* uma_name = "Startup.BrowserMessageLoopStartTime_PreReadEnabled";
+ if (key.Valid())
+ key.ReadValueDW(L"PreReadExperiment", &pre_read);
+ if (pre_read == 0)
+ uma_name = "Startup.BrowserMessageLoopStartTime_PreReadDisabled";
jar (doing other things) 2011/08/03 21:24:34 personal preference nit: Same comment about refact
chrisha 2011/08/04 14:48:40 Done.
+ UMA_HISTOGRAM_MEDIUM_TIMES(uma_name, elapsed_from_startup);
}
int AskForUninstallConfirmation() {
« chrome/browser/browser_main.cc ('K') | « chrome/browser/browser_main.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698