| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |