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

Side by Side Diff: chrome/browser/nacl_host/nacl_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
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 "chrome/browser/nacl_host/nacl_process_host.h" 5 #include "chrome/browser/nacl_host/nacl_process_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/base_switches.h" 11 #include "base/base_switches.h"
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/file_util.h" 14 #include "base/file_util.h"
15 #include "base/message_loop/message_loop.h" 15 #include "base/message_loop/message_loop.h"
16 #include "base/metrics/histogram.h" 16 #include "base/metrics/histogram.h"
17 #include "base/path_service.h" 17 #include "base/path_service.h"
18 #include "base/process/launch.h"
18 #include "base/process/process_iterator.h" 19 #include "base/process/process_iterator.h"
19 #include "base/rand_util.h" 20 #include "base/rand_util.h"
20 #include "base/strings/string_number_conversions.h" 21 #include "base/strings/string_number_conversions.h"
21 #include "base/strings/string_split.h" 22 #include "base/strings/string_split.h"
22 #include "base/strings/string_util.h" 23 #include "base/strings/string_util.h"
23 #include "base/strings/stringprintf.h" 24 #include "base/strings/stringprintf.h"
24 #include "base/strings/utf_string_conversions.h" 25 #include "base/strings/utf_string_conversions.h"
25 #include "base/win/windows_version.h" 26 #include "base/win/windows_version.h"
26 #include "build/build_config.h" 27 #include "build/build_config.h"
27 #include "chrome/browser/nacl_host/nacl_browser.h" 28 #include "chrome/browser/nacl_host/nacl_browser.h"
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 weak_factory_.GetWeakPtr(), channel_id)) { 540 weak_factory_.GetWeakPtr(), channel_id)) {
540 SendErrorToRenderer("broker service did not launch process"); 541 SendErrorToRenderer("broker service did not launch process");
541 return false; 542 return false;
542 } 543 }
543 } else { 544 } else {
544 process_->Launch(new NaClSandboxedProcessLauncherDelegate, 545 process_->Launch(new NaClSandboxedProcessLauncherDelegate,
545 cmd_line.release()); 546 cmd_line.release());
546 } 547 }
547 #elif defined(OS_POSIX) 548 #elif defined(OS_POSIX)
548 process_->Launch(nacl_loader_prefix.empty(), // use_zygote 549 process_->Launch(nacl_loader_prefix.empty(), // use_zygote
549 base::EnvironmentVector(), 550 base::EnvironmentMap(),
550 cmd_line.release()); 551 cmd_line.release());
551 #endif 552 #endif
552 553
553 return true; 554 return true;
554 } 555 }
555 556
556 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) { 557 bool NaClProcessHost::OnMessageReceived(const IPC::Message& msg) {
557 bool handled = true; 558 bool handled = true;
558 IPC_BEGIN_MESSAGE_MAP(NaClProcessHost, msg) 559 IPC_BEGIN_MESSAGE_MAP(NaClProcessHost, msg)
559 IPC_MESSAGE_HANDLER(NaClProcessMsg_QueryKnownToValidate, 560 IPC_MESSAGE_HANDLER(NaClProcessMsg_QueryKnownToValidate,
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 } else { 1015 } else {
1015 NaClStartDebugExceptionHandlerThread( 1016 NaClStartDebugExceptionHandlerThread(
1016 process_handle.Take(), info, 1017 process_handle.Take(), info,
1017 base::MessageLoopProxy::current(), 1018 base::MessageLoopProxy::current(),
1018 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, 1019 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker,
1019 weak_factory_.GetWeakPtr())); 1020 weak_factory_.GetWeakPtr()));
1020 return true; 1021 return true;
1021 } 1022 }
1022 } 1023 }
1023 #endif 1024 #endif
OLDNEW
« no previous file with comments | « chrome/browser/importer/external_process_importer_client.cc ('k') | chrome/browser/platform_util_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698