| 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 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 Loading... |
| 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 } |
| OLD | NEW |