Chromium Code Reviews| 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() { |