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

Side by Side 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, 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/chrome_browser.gypi » ('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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } 83 }
84 } 84 }
85 85
86 void RecordBrowserStartupTime() { 86 void RecordBrowserStartupTime() {
87 // Calculate the time that has elapsed from our own process creation. 87 // Calculate the time that has elapsed from our own process creation.
88 FILETIME creation_time = {}; 88 FILETIME creation_time = {};
89 FILETIME ignore = {}; 89 FILETIME ignore = {};
90 ::GetProcessTimes(::GetCurrentProcess(), &creation_time, &ignore, &ignore, 90 ::GetProcessTimes(::GetCurrentProcess(), &creation_time, &ignore, &ignore,
91 &ignore); 91 &ignore);
92 92
93 base::TimeDelta elapsed_from_startup = 93 RecordPreReadExperimentTime(
94 base::Time::Now() - base::Time::FromFileTime(creation_time); 94 "Startup.BrowserMessageLoopStartTime",
95 95 base::Time::Now() - base::Time::FromFileTime(creation_time));
96 // Record the time to present in a histogram.
97 UMA_HISTOGRAM_MEDIUM_TIMES("Startup.BrowserMessageLoopStartTime",
98 elapsed_from_startup);
99 } 96 }
100 97
101 int AskForUninstallConfirmation() { 98 int AskForUninstallConfirmation() {
102 int ret = content::RESULT_CODE_NORMAL_EXIT; 99 int ret = content::RESULT_CODE_NORMAL_EXIT;
103 views::Widget::CreateWindow(new UninstallView(ret))->Show(); 100 views::Widget::CreateWindow(new UninstallView(ret))->Show();
104 views::AcceleratorHandler accelerator_handler; 101 views::AcceleratorHandler accelerator_handler;
105 MessageLoopForUI::current()->Run(&accelerator_handler); 102 MessageLoopForUI::current()->Run(&accelerator_handler);
106 return ret; 103 return ret;
107 } 104 }
108 105
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 crypto::EnsureNSPRInit(); 312 crypto::EnsureNSPRInit();
316 } 313 }
317 } 314 }
318 }; 315 };
319 316
320 // static 317 // static
321 BrowserMainParts* BrowserMainParts::CreateBrowserMainParts( 318 BrowserMainParts* BrowserMainParts::CreateBrowserMainParts(
322 const MainFunctionParams& parameters) { 319 const MainFunctionParams& parameters) {
323 return new BrowserMainPartsWin(parameters); 320 return new BrowserMainPartsWin(parameters);
324 } 321 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698