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

Side by Side Diff: content/browser/plugin_process_host.cc

Issue 22750002: Move AlterEnvironment to base/environment.h, implement on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win Created 7 years, 3 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/browser/gpu/gpu_process_host.cc ('k') | content/browser/ppapi_plugin_process_host.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 "content/browser/plugin_process_host.h" 5 #include "content/browser/plugin_process_host.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #elif defined(OS_POSIX) 9 #elif defined(OS_POSIX)
10 #include <utility> // for pair<> 10 #include <utility> // for pair<>
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 std::string locale = GetContentClient()->browser()->GetApplicationLocale(); 213 std::string locale = GetContentClient()->browser()->GetApplicationLocale();
214 if (!locale.empty()) { 214 if (!locale.empty()) {
215 // Pass on the locale so the null plugin will use the right language in the 215 // Pass on the locale so the null plugin will use the right language in the
216 // prompt to install the desired plugin. 216 // prompt to install the desired plugin.
217 cmd_line->AppendSwitchASCII(switches::kLang, locale); 217 cmd_line->AppendSwitchASCII(switches::kLang, locale);
218 } 218 }
219 219
220 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); 220 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id);
221 221
222 #if defined(OS_POSIX) 222 #if defined(OS_POSIX)
223 base::EnvironmentVector env; 223 base::EnvironmentMap env;
224 #if defined(OS_MACOSX) && !defined(__LP64__) 224 #if defined(OS_MACOSX) && !defined(__LP64__)
225 if (!browser_command_line.HasSwitch(switches::kDisableCarbonInterposing)) { 225 if (!browser_command_line.HasSwitch(switches::kDisableCarbonInterposing)) {
226 std::string interpose_list = GetContentClient()->GetCarbonInterposePath(); 226 std::string interpose_list = GetContentClient()->GetCarbonInterposePath();
227 if (!interpose_list.empty()) { 227 if (!interpose_list.empty()) {
228 // Add our interposing library for Carbon. This is stripped back out in 228 // Add our interposing library for Carbon. This is stripped back out in
229 // plugin_main.cc, so changes here should be reflected there. 229 // plugin_main.cc, so changes here should be reflected there.
230 const char* existing_list = getenv(kDYLDInsertLibrariesKey); 230 const char* existing_list = getenv(kDYLDInsertLibrariesKey);
231 if (existing_list) { 231 if (existing_list) {
232 interpose_list.insert(0, ":"); 232 interpose_list.insert(0, ":");
233 interpose_list.insert(0, existing_list); 233 interpose_list.insert(0, existing_list);
234 } 234 }
235 } 235 }
236 env.push_back(std::pair<std::string, std::string>( 236 env[kDYLDInsertLibrariesKey] = interpose_list;
237 kDYLDInsertLibrariesKey, interpose_list));
238 } 237 }
239 #endif 238 #endif
240 #endif 239 #endif
241 240
242 process_->Launch( 241 process_->Launch(
243 #if defined(OS_WIN) 242 #if defined(OS_WIN)
244 new PluginSandboxedProcessLauncherDelegate, 243 new PluginSandboxedProcessLauncherDelegate,
245 #elif defined(OS_POSIX) 244 #elif defined(OS_POSIX)
246 false, 245 false,
247 env, 246 env,
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 void PluginProcessHost::OnChannelCreated( 407 void PluginProcessHost::OnChannelCreated(
409 const IPC::ChannelHandle& channel_handle) { 408 const IPC::ChannelHandle& channel_handle) {
410 Client* client = sent_requests_.front(); 409 Client* client = sent_requests_.front();
411 410
412 if (client) 411 if (client)
413 client->OnChannelOpened(channel_handle); 412 client->OnChannelOpened(channel_handle);
414 sent_requests_.pop_front(); 413 sent_requests_.pop_front();
415 } 414 }
416 415
417 } // namespace content 416 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | content/browser/ppapi_plugin_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698