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

Side by Side Diff: content/renderer/render_process_impl.cc

Issue 803813003: Make callers of CommandLine use it via the base:: namespace. (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 | « content/renderer/render_frame_impl.cc ('k') | content/renderer/render_thread_impl.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/renderer/render_process_impl.h" 5 #include "content/renderer/render_process_impl.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <windows.h> 10 #include <windows.h>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 } 43 }
44 #endif 44 #endif
45 45
46 if (base::SysInfo::IsLowEndDevice()) { 46 if (base::SysInfo::IsLowEndDevice()) {
47 std::string optimize_flag("--optimize-for-size"); 47 std::string optimize_flag("--optimize-for-size");
48 v8::V8::SetFlagsFromString(optimize_flag.c_str(), 48 v8::V8::SetFlagsFromString(optimize_flag.c_str(),
49 static_cast<int>(optimize_flag.size())); 49 static_cast<int>(optimize_flag.size()));
50 } 50 }
51 51
52 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 52 const base::CommandLine& command_line =
53 *base::CommandLine::ForCurrentProcess();
53 if (command_line.HasSwitch(switches::kJavaScriptFlags)) { 54 if (command_line.HasSwitch(switches::kJavaScriptFlags)) {
54 std::string flags( 55 std::string flags(
55 command_line.GetSwitchValueASCII(switches::kJavaScriptFlags)); 56 command_line.GetSwitchValueASCII(switches::kJavaScriptFlags));
56 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); 57 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size()));
57 } 58 }
58 59
59 // Turn on cross-site document blocking for renderer processes. 60 // Turn on cross-site document blocking for renderer processes.
60 SiteIsolationPolicy::SetPolicyEnabled( 61 SiteIsolationPolicy::SetPolicyEnabled(
61 GetContentClient()->renderer()->ShouldEnableSiteIsolationPolicy()); 62 GetContentClient()->renderer()->ShouldEnableSiteIsolationPolicy());
62 } 63 }
(...skipping 10 matching lines...) Expand all
73 74
74 void RenderProcessImpl::AddBindings(int bindings) { 75 void RenderProcessImpl::AddBindings(int bindings) {
75 enabled_bindings_ |= bindings; 76 enabled_bindings_ |= bindings;
76 } 77 }
77 78
78 int RenderProcessImpl::GetEnabledBindings() const { 79 int RenderProcessImpl::GetEnabledBindings() const {
79 return enabled_bindings_; 80 return enabled_bindings_;
80 } 81 }
81 82
82 } // namespace content 83 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698