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

Side by Side Diff: components/nacl/loader/nacl_helper_win_64.cc

Issue 774933004: Prefix CommandLine usage with base namespace (Part 9: components) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « components/nacl/loader/nacl_helper_linux.cc ('k') | components/nacl/loader/nacl_listener.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/logging.h" 6 #include "base/logging.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/power_monitor/power_monitor.h" 8 #include "base/power_monitor/power_monitor.h"
9 #include "base/power_monitor/power_monitor_device_source.h" 9 #include "base/power_monitor/power_monitor_device_source.h"
10 #include "base/process/launch.h" 10 #include "base/process/launch.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 } // namespace 44 } // namespace
45 45
46 namespace nacl { 46 namespace nacl {
47 47
48 int NaClWin64Main() { 48 int NaClWin64Main() {
49 sandbox::SandboxInterfaceInfo sandbox_info = {0}; 49 sandbox::SandboxInterfaceInfo sandbox_info = {0};
50 content::InitializeSandboxInfo(&sandbox_info); 50 content::InitializeSandboxInfo(&sandbox_info);
51 51
52 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 52 const base::CommandLine& command_line =
53 *base::CommandLine::ForCurrentProcess();
53 std::string process_type = 54 std::string process_type =
54 command_line.GetSwitchValueASCII(switches::kProcessType); 55 command_line.GetSwitchValueASCII(switches::kProcessType);
55 56
56 // Copy what ContentMain() does. 57 // Copy what ContentMain() does.
57 base::EnableTerminationOnHeapCorruption(); 58 base::EnableTerminationOnHeapCorruption();
58 base::EnableTerminationOnOutOfMemory(); 59 base::EnableTerminationOnOutOfMemory();
59 content::RegisterInvalidParamHandler(); 60 content::RegisterInvalidParamHandler();
60 content::SetupCRT(command_line); 61 content::SetupCRT(command_line);
61 // Route stdio to parent console (if any) or create one. 62 // Route stdio to parent console (if any) or create one.
62 if (command_line.HasSwitch(switches::kEnableLogging)) 63 if (command_line.HasSwitch(switches::kEnableLogging))
(...skipping 11 matching lines...) Expand all
74 return NaClMain(main_params); 75 return NaClMain(main_params);
75 76
76 if (process_type == switches::kNaClBrokerProcess) 77 if (process_type == switches::kNaClBrokerProcess)
77 return NaClBrokerMain(main_params); 78 return NaClBrokerMain(main_params);
78 79
79 CHECK(false) << "Unknown NaCl 64 process."; 80 CHECK(false) << "Unknown NaCl 64 process.";
80 return -1; 81 return -1;
81 } 82 }
82 83
83 } // namespace nacl 84 } // namespace nacl
OLDNEW
« no previous file with comments | « components/nacl/loader/nacl_helper_linux.cc ('k') | components/nacl/loader/nacl_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698