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

Side by Side Diff: content/ppapi_plugin/ppapi_broker_main.cc

Issue 7529003: Make base::MessageLoops have names at construction time (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make message loop name optional. Created 9 years, 4 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 | « content/plugin/plugin_main.cc ('k') | content/ppapi_plugin/ppapi_plugin_main.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/threading/platform_thread.h"
7 #include "build/build_config.h" 6 #include "build/build_config.h"
8 #include "content/common/child_process.h" 7 #include "content/common/child_process.h"
9 #include "content/common/content_switches.h" 8 #include "content/common/content_switches.h"
10 #include "content/common/main_function_params.h" 9 #include "content/common/main_function_params.h"
11 #include "content/ppapi_plugin/ppapi_thread.h" 10 #include "content/ppapi_plugin/ppapi_thread.h"
12 11
13 // Main function for starting the PPAPI broker process. 12 // Main function for starting the PPAPI broker process.
14 int PpapiBrokerMain(const MainFunctionParams& parameters) { 13 int PpapiBrokerMain(const MainFunctionParams& parameters) {
15 const CommandLine& command_line = parameters.command_line_; 14 const CommandLine& command_line = parameters.command_line_;
16 if (command_line.HasSwitch(switches::kPpapiStartupDialog)) { 15 if (command_line.HasSwitch(switches::kPpapiStartupDialog)) {
17 ChildProcess::WaitForDebugger("PpapiBroker"); 16 ChildProcess::WaitForDebugger("PpapiBroker");
18 } 17 }
19 18
20 MessageLoop main_message_loop(MessageLoop::TYPE_DEFAULT); 19 MessageLoop main_message_loop("CrPPAPIBrokerMain", MessageLoop::TYPE_DEFAULT);
21 base::PlatformThread::SetName("CrPPAPIBrokerMain");
22 20
23 ChildProcess ppapi_broker_process; 21 ChildProcess ppapi_broker_process;
24 ppapi_broker_process.set_main_thread(new PpapiThread(true)); // Broker. 22 ppapi_broker_process.set_main_thread(new PpapiThread(true)); // Broker.
25 23
26 main_message_loop.Run(); 24 main_message_loop.Run();
27 return 0; 25 return 0;
28 } 26 }
OLDNEW
« no previous file with comments | « content/plugin/plugin_main.cc ('k') | content/ppapi_plugin/ppapi_plugin_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698