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

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

Issue 3057033: Remove GetSwitchValue() from chrome/* where easy. (Closed)
Patch Set: finally Created 10 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
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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <objbase.h> 8 #include <objbase.h>
9 #include <windows.h> 9 #include <windows.h>
10 #endif 10 #endif
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 DLOG(INFO) << "Started plugin with " << 87 DLOG(INFO) << "Started plugin with " <<
88 parsed_command_line.command_line_string(); 88 parsed_command_line.command_line_string();
89 89
90 HMODULE sandbox_test_module = NULL; 90 HMODULE sandbox_test_module = NULL;
91 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox) || 91 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox) ||
92 !parsed_command_line.HasSwitch(switches::kSafePlugins); 92 !parsed_command_line.HasSwitch(switches::kSafePlugins);
93 if (target_services && !no_sandbox) { 93 if (target_services && !no_sandbox) {
94 // The command line might specify a test plugin to load. 94 // The command line might specify a test plugin to load.
95 if (parsed_command_line.HasSwitch(switches::kTestSandbox)) { 95 if (parsed_command_line.HasSwitch(switches::kTestSandbox)) {
96 std::wstring test_plugin_name = 96 std::wstring test_plugin_name =
97 parsed_command_line.GetSwitchValue(switches::kTestSandbox); 97 parsed_command_line.GetSwitchValueNative(switches::kTestSandbox);
98 sandbox_test_module = LoadLibrary(test_plugin_name.c_str()); 98 sandbox_test_module = LoadLibrary(test_plugin_name.c_str());
99 DCHECK(sandbox_test_module); 99 DCHECK(sandbox_test_module);
100 } 100 }
101 } 101 }
102 #endif 102 #endif
103 if (parsed_command_line.HasSwitch(switches::kPluginStartupDialog)) { 103 if (parsed_command_line.HasSwitch(switches::kPluginStartupDialog)) {
104 ChildProcess::WaitForDebugger(L"Plugin"); 104 ChildProcess::WaitForDebugger(L"Plugin");
105 } 105 }
106 106
107 { 107 {
(...skipping 27 matching lines...) Expand all
135 135
136 MessageLoop::current()->Run(); 136 MessageLoop::current()->Run();
137 } 137 }
138 138
139 #if defined(OS_WIN) 139 #if defined(OS_WIN)
140 CoUninitialize(); 140 CoUninitialize();
141 #endif 141 #endif
142 142
143 return 0; 143 return 0;
144 } 144 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698