| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 13 matching lines...) Expand all Loading... |
| 24 #include "chrome/installer/util/install_util.h" | 24 #include "chrome/installer/util/install_util.h" |
| 25 #include "chrome/installer/util/shell_util.h" | 25 #include "chrome/installer/util/shell_util.h" |
| 26 #include "grit/chromium_strings.h" | 26 #include "grit/chromium_strings.h" |
| 27 #include "grit/generated_resources.h" | 27 #include "grit/generated_resources.h" |
| 28 #include "views/focus/accelerator_handler.h" | 28 #include "views/focus/accelerator_handler.h" |
| 29 #include "views/window/window.h" | 29 #include "views/window/window.h" |
| 30 | 30 |
| 31 namespace Platform { | 31 namespace Platform { |
| 32 | 32 |
| 33 void WillInitializeMainMessageLoop(const MainFunctionParams& parameters) { | 33 void WillInitializeMainMessageLoop(const MainFunctionParams& parameters) { |
| 34 OleInitialize(NULL); |
| 34 } | 35 } |
| 35 | 36 |
| 36 void DidEndMainMessageLoop() { | 37 void DidEndMainMessageLoop() { |
| 38 OleUninitialize(); |
| 37 } | 39 } |
| 38 | 40 |
| 39 void RecordBreakpadStatusUMA(MetricsService* metrics) { | 41 void RecordBreakpadStatusUMA(MetricsService* metrics) { |
| 40 DWORD len = ::GetEnvironmentVariableW(env_vars::kNoOOBreakpad, NULL, 0); | 42 DWORD len = ::GetEnvironmentVariableW(env_vars::kNoOOBreakpad, NULL, 0); |
| 41 metrics->RecordBreakpadRegistration((len == 0)); | 43 metrics->RecordBreakpadRegistration((len == 0)); |
| 42 metrics->RecordBreakpadHasDebugger(TRUE == ::IsDebuggerPresent()); | 44 metrics->RecordBreakpadHasDebugger(TRUE == ::IsDebuggerPresent()); |
| 43 } | 45 } |
| 44 | 46 |
| 45 } // namespace Platform | 47 } // namespace Platform |
| 46 | 48 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 bool DoUpgradeTasks(const CommandLine& command_line) { | 204 bool DoUpgradeTasks(const CommandLine& command_line) { |
| 203 if (!Upgrade::SwapNewChromeExeIfPresent()) | 205 if (!Upgrade::SwapNewChromeExeIfPresent()) |
| 204 return false; | 206 return false; |
| 205 // At this point the chrome.exe has been swapped with the new one. | 207 // At this point the chrome.exe has been swapped with the new one. |
| 206 if (!Upgrade::RelaunchChromeBrowser(command_line)) { | 208 if (!Upgrade::RelaunchChromeBrowser(command_line)) { |
| 207 // The re-launch fails. Feel free to panic now. | 209 // The re-launch fails. Feel free to panic now. |
| 208 NOTREACHED(); | 210 NOTREACHED(); |
| 209 } | 211 } |
| 210 return true; | 212 return true; |
| 211 } | 213 } |
| OLD | NEW |