Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Side by Side Diff: win8/metro_driver/metro_driver.cc

Issue 16519003: Define a LoggingSettings struct to use for InitLogging() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/support/webkit_support.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « webkit/support/webkit_support.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698