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

Side by Side Diff: chrome/plugin/plugin_main.cc

Issue 17426: remove chrome dependencies from win sandboxing headers. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "base/system_monitor.h" 7 #include "base/system_monitor.h"
8 #include "chrome/common/chrome_constants.h" 8 #include "chrome/common/chrome_constants.h"
9 #include "chrome/common/chrome_switches.h" 9 #include "chrome/common/chrome_switches.h"
10 #include "chrome/common/logging_chrome.h" 10 #include "chrome/common/logging_chrome.h"
11 #include "chrome/common/main_function_params.h"
11 #include "chrome/common/win_util.h" 12 #include "chrome/common/win_util.h"
12 #include "chrome/plugin/plugin_process.h" 13 #include "chrome/plugin/plugin_process.h"
13 #include "chrome/test/injection_test_dll.h" 14 #include "chrome/test/injection_test_dll.h"
14 #include "sandbox/src/sandbox.h" 15 #include "sandbox/src/sandbox.h"
15 16
16 // mainline routine for running as the plugin process 17 // mainline routine for running as the plugin process
17 int PluginMain(CommandLine &parsed_command_line, 18 int PluginMain(const MainFunctionParams& parameters) {
18 sandbox::TargetServices* target_services) { 19 CommandLine& parsed_command_line = parameters.command_line_;
20 sandbox::TargetServices* target_services =
21 parameters.sandbox_info_.TargetServices();
22
19 // The main thread of the plugin services IO. 23 // The main thread of the plugin services IO.
20 MessageLoopForIO main_message_loop; 24 MessageLoopForIO main_message_loop;
21 std::wstring app_name = chrome::kBrowserAppName; 25 std::wstring app_name = chrome::kBrowserAppName;
22 PlatformThread::SetName(WideToASCII(app_name + L"_PluginMain").c_str()); 26 PlatformThread::SetName(WideToASCII(app_name + L"_PluginMain").c_str());
23 27
24 // Initialize the SystemMonitor 28 // Initialize the SystemMonitor
25 base::SystemMonitor::Start(); 29 base::SystemMonitor::Start();
26 30
27 CoInitialize(NULL); 31 CoInitialize(NULL);
28 DLOG(INFO) << "Started plugin with " << 32 DLOG(INFO) << "Started plugin with " <<
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Load the accelerator table from the browser executable and tell the 81 // Load the accelerator table from the browser executable and tell the
78 // message loop to use it when translating messages. 82 // message loop to use it when translating messages.
79 MessageLoop::current()->Run(); 83 MessageLoop::current()->Run();
80 } 84 }
81 PluginProcess::GlobalCleanup(); 85 PluginProcess::GlobalCleanup();
82 86
83 CoUninitialize(); 87 CoUninitialize();
84 return 0; 88 return 0;
85 } 89 }
86 90
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698