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/chrome_browser_main_win.h" | 5 #include "chrome/browser/chrome_browser_main_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 base::win::WinProcExceptionFilter exception_filter = | 50 base::win::WinProcExceptionFilter exception_filter = |
51 reinterpret_cast<base::win::WinProcExceptionFilter>( | 51 reinterpret_cast<base::win::WinProcExceptionFilter>( |
52 ::GetProcAddress(::GetModuleHandle( | 52 ::GetProcAddress(::GetModuleHandle( |
53 chrome::kBrowserProcessExecutableName), | 53 chrome::kBrowserProcessExecutableName), |
54 "CrashForException")); | 54 "CrashForException")); |
55 exception_filter = base::win::SetWinProcExceptionFilter(exception_filter); | 55 exception_filter = base::win::SetWinProcExceptionFilter(exception_filter); |
56 DCHECK(!exception_filter); | 56 DCHECK(!exception_filter); |
57 } | 57 } |
58 } // namespace | 58 } // namespace |
59 | 59 |
60 namespace content { | |
61 | |
62 void DidEndMainMessageLoop() { | |
63 OleUninitialize(); | |
64 } | |
65 | |
66 } | |
67 | |
68 void RecordBreakpadStatusUMA(MetricsService* metrics) { | 60 void RecordBreakpadStatusUMA(MetricsService* metrics) { |
69 DWORD len = ::GetEnvironmentVariableW( | 61 DWORD len = ::GetEnvironmentVariableW( |
70 ASCIIToWide(env_vars::kNoOOBreakpad).c_str() , NULL, 0); | 62 ASCIIToWide(env_vars::kNoOOBreakpad).c_str() , NULL, 0); |
71 metrics->RecordBreakpadRegistration((len == 0)); | 63 metrics->RecordBreakpadRegistration((len == 0)); |
72 metrics->RecordBreakpadHasDebugger(TRUE == ::IsDebuggerPresent()); | 64 metrics->RecordBreakpadHasDebugger(TRUE == ::IsDebuggerPresent()); |
73 } | 65 } |
74 | 66 |
75 void WarnAboutMinimumSystemRequirements() { | 67 void WarnAboutMinimumSystemRequirements() { |
76 if (base::win::GetVersion() < base::win::VERSION_XP) { | 68 if (base::win::GetVersion() < base::win::VERSION_XP) { |
77 // Display a warning message if the user is running chrome on Windows 2000. | 69 // Display a warning message if the user is running chrome on Windows 2000. |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 const MainFunctionParams& parameters) | 275 const MainFunctionParams& parameters) |
284 : ChromeBrowserMainParts(parameters) { | 276 : ChromeBrowserMainParts(parameters) { |
285 } | 277 } |
286 | 278 |
287 void ChromeBrowserMainPartsWin::PreMainMessageLoopStart() { | 279 void ChromeBrowserMainPartsWin::PreMainMessageLoopStart() { |
288 if (!parameters().ui_task) { | 280 if (!parameters().ui_task) { |
289 // Make sure that we know how to handle exceptions from the message loop. | 281 // Make sure that we know how to handle exceptions from the message loop. |
290 InitializeWindowProcExceptions(); | 282 InitializeWindowProcExceptions(); |
291 } | 283 } |
292 } | 284 } |
OLD | NEW |