OLD | NEW |
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 Loading... |
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 RecordPreReadExperimentTime("Startup.BrowserMessageLoopStartTime", | 99 UMA_HISTOGRAM_CUSTOM_TIMES( |
100 base::Time::Now() - base::Time::FromFileTime(creation_time)); | 100 "Startup.BrowserMessageLoopStartTime", |
| 101 base::Time::Now() - base::Time::FromFileTime(creation_time), |
| 102 base::TimeDelta::FromMilliseconds(1), |
| 103 base::TimeDelta::FromHours(1), |
| 104 100); |
101 } | 105 } |
102 | 106 |
103 int AskForUninstallConfirmation() { | 107 int AskForUninstallConfirmation() { |
104 int ret = content::RESULT_CODE_NORMAL_EXIT; | 108 int ret = content::RESULT_CODE_NORMAL_EXIT; |
105 views::Widget::CreateWindow(new UninstallView(ret))->Show(); | 109 views::Widget::CreateWindow(new UninstallView(ret))->Show(); |
106 views::AcceleratorHandler accelerator_handler; | 110 views::AcceleratorHandler accelerator_handler; |
107 MessageLoopForUI::current()->Run(&accelerator_handler); | 111 MessageLoopForUI::current()->Run(&accelerator_handler); |
108 return ret; | 112 return ret; |
109 } | 113 } |
110 | 114 |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 crypto::EnsureNSPRInit(); | 321 crypto::EnsureNSPRInit(); |
318 } | 322 } |
319 } | 323 } |
320 }; | 324 }; |
321 | 325 |
322 // static | 326 // static |
323 BrowserMainParts* BrowserMainParts::CreateBrowserMainParts( | 327 BrowserMainParts* BrowserMainParts::CreateBrowserMainParts( |
324 const MainFunctionParams& parameters) { | 328 const MainFunctionParams& parameters) { |
325 return new BrowserMainPartsWin(parameters); | 329 return new BrowserMainPartsWin(parameters); |
326 } | 330 } |
OLD | NEW |