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

Side by Side Diff: ppapi/proxy/plugin_main_nacl.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 | « net/tools/tld_cleanup/tld_cleanup.cc ('k') | remoting/host/logging_posix.cc » ('j') | 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 <map> 5 #include <map>
6 #include <set> 6 #include <set>
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 // Need to include this before most other files because it defines 9 // Need to include this before most other files because it defines
10 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define 10 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 const ppapi::PpapiNaClChannelArgs& args, 183 const ppapi::PpapiNaClChannelArgs& args,
184 SerializedHandle handle) { 184 SerializedHandle handle) {
185 static bool command_line_and_logging_initialized = false; 185 static bool command_line_and_logging_initialized = false;
186 if (!command_line_and_logging_initialized) { 186 if (!command_line_and_logging_initialized) {
187 CommandLine::Init(0, NULL); 187 CommandLine::Init(0, NULL);
188 for (size_t i = 0; i < args.switch_names.size(); ++i) { 188 for (size_t i = 0; i < args.switch_names.size(); ++i) {
189 DCHECK(i < args.switch_values.size()); 189 DCHECK(i < args.switch_values.size());
190 CommandLine::ForCurrentProcess()->AppendSwitchASCII( 190 CommandLine::ForCurrentProcess()->AppendSwitchASCII(
191 args.switch_names[i], args.switch_values[i]); 191 args.switch_names[i], args.switch_values[i]);
192 } 192 }
193 logging::InitLogging( 193 logging::LoggingSettings settings;
194 NULL, 194 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
195 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, 195 logging::InitLogging(settings);
196 logging::DONT_LOCK_LOG_FILE,
197 logging::DELETE_OLD_LOG_FILE,
198 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
199 command_line_and_logging_initialized = true; 196 command_line_and_logging_initialized = true;
200 } 197 }
201 // Tell the process-global GetInterface which interfaces it can return to the 198 // Tell the process-global GetInterface which interfaces it can return to the
202 // plugin. 199 // plugin.
203 ppapi::proxy::InterfaceList::SetProcessGlobalPermissions( 200 ppapi::proxy::InterfaceList::SetProcessGlobalPermissions(
204 args.permissions); 201 args.permissions);
205 202
206 PluginDispatcher* dispatcher = 203 PluginDispatcher* dispatcher =
207 new PluginDispatcher(::PPP_GetInterface, args.permissions, 204 new PluginDispatcher(::PPP_GetInterface, args.permissions,
208 args.off_the_record); 205 args.off_the_record);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 288
292 PpapiDispatcher ppapi_dispatcher(io_thread.message_loop_proxy()); 289 PpapiDispatcher ppapi_dispatcher(io_thread.message_loop_proxy());
293 plugin_globals.set_plugin_proxy_delegate(&ppapi_dispatcher); 290 plugin_globals.set_plugin_proxy_delegate(&ppapi_dispatcher);
294 291
295 loop.Run(); 292 loop.Run();
296 293
297 NaClSrpcModuleFini(); 294 NaClSrpcModuleFini();
298 295
299 return 0; 296 return 0;
300 } 297 }
OLDNEW
« no previous file with comments | « net/tools/tld_cleanup/tld_cleanup.cc ('k') | remoting/host/logging_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698