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

Side by Side Diff: chrome/browser/browser_main_win.cc

Issue 7712014: Make a channel and time limited persistent PreRead experiment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/common/chrome_constants.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/browser_main.h" 5 #include "chrome/browser/browser_main.h"
6 #include "chrome/browser/browser_main_win.h" 6 #include "chrome/browser/browser_main_win.h"
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 MB_OK | MB_ICONERROR | MB_TOPMOST); 89 MB_OK | MB_ICONERROR | MB_TOPMOST);
90 } 90 }
91 91
92 void RecordBrowserStartupTime() { 92 void RecordBrowserStartupTime() {
93 // Calculate the time that has elapsed from our own process creation. 93 // Calculate the time that has elapsed from our own process creation.
94 FILETIME creation_time = {}; 94 FILETIME creation_time = {};
95 FILETIME ignore = {}; 95 FILETIME ignore = {};
96 ::GetProcessTimes(::GetCurrentProcess(), &creation_time, &ignore, &ignore, 96 ::GetProcessTimes(::GetCurrentProcess(), &creation_time, &ignore, &ignore,
97 &ignore); 97 &ignore);
98 98
99 UMA_HISTOGRAM_CUSTOM_TIMES( 99 RecordPreReadExperimentTime("Startup.BrowserMessageLoopStartTime",
100 "Startup.BrowserMessageLoopStartTime", 100 base::Time::Now() - base::Time::FromFileTime(creation_time));
101 base::Time::Now() - base::Time::FromFileTime(creation_time),
102 base::TimeDelta::FromMilliseconds(1),
103 base::TimeDelta::FromHours(1),
104 100);
105 } 101 }
106 102
107 int AskForUninstallConfirmation() { 103 int AskForUninstallConfirmation() {
108 int ret = content::RESULT_CODE_NORMAL_EXIT; 104 int ret = content::RESULT_CODE_NORMAL_EXIT;
109 views::Widget::CreateWindow(new UninstallView(ret))->Show(); 105 views::Widget::CreateWindow(new UninstallView(ret))->Show();
110 views::AcceleratorHandler accelerator_handler; 106 views::AcceleratorHandler accelerator_handler;
111 MessageLoopForUI::current()->Run(&accelerator_handler); 107 MessageLoopForUI::current()->Run(&accelerator_handler);
112 return ret; 108 return ret;
113 } 109 }
114 110
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 crypto::EnsureNSPRInit(); 317 crypto::EnsureNSPRInit();
322 } 318 }
323 } 319 }
324 }; 320 };
325 321
326 // static 322 // static
327 BrowserMainParts* BrowserMainParts::CreateBrowserMainParts( 323 BrowserMainParts* BrowserMainParts::CreateBrowserMainParts(
328 const MainFunctionParams& parameters) { 324 const MainFunctionParams& parameters) {
329 return new BrowserMainPartsWin(parameters); 325 return new BrowserMainPartsWin(parameters);
330 } 326 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/common/chrome_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698