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