OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "stdafx.h" | 5 #include "stdafx.h" |
6 #include "win8/metro_driver/metro_driver.h" | 6 #include "win8/metro_driver/metro_driver.h" |
7 | 7 |
8 #include <roerrorapi.h> | 8 #include <roerrorapi.h> |
9 #include <shobjidl.h> | 9 #include <shobjidl.h> |
10 | 10 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 CommandLine::Init(0, NULL); | 140 CommandLine::Init(0, NULL); |
141 logging::InitLogging( | 141 logging::InitLogging( |
142 NULL, | 142 NULL, |
143 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, | 143 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, |
144 logging::LOCK_LOG_FILE, | 144 logging::LOCK_LOG_FILE, |
145 logging::DELETE_OLD_LOG_FILE, | 145 logging::DELETE_OLD_LOG_FILE, |
146 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); | 146 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); |
147 | 147 |
148 #if defined(NDEBUG) | 148 #if defined(NDEBUG) |
149 logging::SetMinLogLevel(logging::LOG_ERROR); | 149 logging::SetMinLogLevel(logging::LOG_ERROR); |
150 // Bind to the breakpad handling function. | |
151 globals.breakpad_exception_handler = | |
152 reinterpret_cast<BreakpadExceptionHandler>( | |
153 ::GetProcAddress(::GetModuleHandle(NULL), | |
154 "CrashForException")); | |
155 if (!globals.breakpad_exception_handler) { | |
156 DVLOG(0) << "CrashForException export not found"; | |
157 } | |
158 #else | 150 #else |
159 logging::SetMinLogLevel(logging::LOG_VERBOSE); | 151 logging::SetMinLogLevel(logging::LOG_VERBOSE); |
160 // Set the error reporting flags to always raise an exception, | 152 // Set the error reporting flags to always raise an exception, |
161 // which is then processed by our vectored exception handling | 153 // which is then processed by our vectored exception handling |
162 // above to log the error message. | 154 // above to log the error message. |
163 winfoundtn::Diagnostics::SetErrorReportingFlags( | 155 winfoundtn::Diagnostics::SetErrorReportingFlags( |
164 winfoundtn::Diagnostics::UseSetErrorInfo | | 156 winfoundtn::Diagnostics::UseSetErrorInfo | |
165 winfoundtn::Diagnostics::ForceExceptions); | 157 winfoundtn::Diagnostics::ForceExceptions); |
166 | 158 |
167 HANDLE registration = | 159 HANDLE registration = |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 extern "C" __declspec(dllexport) | 200 extern "C" __declspec(dllexport) |
209 HRESULT ActivateApplication(const wchar_t* app_id) { | 201 HRESULT ActivateApplication(const wchar_t* app_id) { |
210 base::win::ScopedComPtr<IApplicationActivationManager> activator; | 202 base::win::ScopedComPtr<IApplicationActivationManager> activator; |
211 HRESULT hr = activator.CreateInstance(CLSID_ApplicationActivationManager); | 203 HRESULT hr = activator.CreateInstance(CLSID_ApplicationActivationManager); |
212 if (SUCCEEDED(hr)) { | 204 if (SUCCEEDED(hr)) { |
213 DWORD pid = 0; | 205 DWORD pid = 0; |
214 hr = activator->ActivateApplication(app_id, L"", AO_NONE, &pid); | 206 hr = activator->ActivateApplication(app_id, L"", AO_NONE, &pid); |
215 } | 207 } |
216 return hr; | 208 return hr; |
217 } | 209 } |
OLD | NEW |