| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // TODO(siggi): This should be handled better, as this way our at exit | 55 // TODO(siggi): This should be handled better, as this way our at exit |
| 56 // registrations will run under the loader's lock. However, | 56 // registrations will run under the loader's lock. However, |
| 57 // once metro_driver is merged into Chrome.dll, this will go away anyhow. | 57 // once metro_driver is merged into Chrome.dll, this will go away anyhow. |
| 58 base::AtExitManager at_exit; | 58 base::AtExitManager at_exit; |
| 59 #endif | 59 #endif |
| 60 | 60 |
| 61 extern "C" __declspec(dllexport) | 61 extern "C" __declspec(dllexport) |
| 62 int InitMetro(LPTHREAD_START_ROUTINE thread_proc, void* context) { | 62 int InitMetro(LPTHREAD_START_ROUTINE thread_proc, void* context) { |
| 63 // Initialize the command line. | 63 // Initialize the command line. |
| 64 CommandLine::Init(0, NULL); | 64 CommandLine::Init(0, NULL); |
| 65 logging::InitLogging( | 65 logging::LoggingSettings settings; |
| 66 NULL, | 66 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; |
| 67 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, | 67 logging::InitLogging(settings); |
| 68 logging::LOCK_LOG_FILE, | |
| 69 logging::DELETE_OLD_LOG_FILE, | |
| 70 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); | |
| 71 | 68 |
| 72 #if defined(NDEBUG) | 69 #if defined(NDEBUG) |
| 73 logging::SetMinLogLevel(logging::LOG_ERROR); | 70 logging::SetMinLogLevel(logging::LOG_ERROR); |
| 74 #else | 71 #else |
| 75 logging::SetMinLogLevel(logging::LOG_VERBOSE); | 72 logging::SetMinLogLevel(logging::LOG_VERBOSE); |
| 76 // Set the error reporting flags to always raise an exception, | 73 // Set the error reporting flags to always raise an exception, |
| 77 // which is then processed by our vectored exception handling | 74 // which is then processed by our vectored exception handling |
| 78 // above to log the error message. | 75 // above to log the error message. |
| 79 winfoundtn::Diagnostics::SetErrorReportingFlags( | 76 winfoundtn::Diagnostics::SetErrorReportingFlags( |
| 80 winfoundtn::Diagnostics::UseSetErrorInfo | | 77 winfoundtn::Diagnostics::UseSetErrorInfo | |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 extern "C" __declspec(dllexport) | 115 extern "C" __declspec(dllexport) |
| 119 HRESULT ActivateApplication(const wchar_t* app_id) { | 116 HRESULT ActivateApplication(const wchar_t* app_id) { |
| 120 base::win::ScopedComPtr<IApplicationActivationManager> activator; | 117 base::win::ScopedComPtr<IApplicationActivationManager> activator; |
| 121 HRESULT hr = activator.CreateInstance(CLSID_ApplicationActivationManager); | 118 HRESULT hr = activator.CreateInstance(CLSID_ApplicationActivationManager); |
| 122 if (SUCCEEDED(hr)) { | 119 if (SUCCEEDED(hr)) { |
| 123 DWORD pid = 0; | 120 DWORD pid = 0; |
| 124 hr = activator->ActivateApplication(app_id, L"", AO_NONE, &pid); | 121 hr = activator->ActivateApplication(app_id, L"", AO_NONE, &pid); |
| 125 } | 122 } |
| 126 return hr; | 123 return hr; |
| 127 } | 124 } |
| OLD | NEW |