Commit 929d45a9 authored by pgal.u-szeged's avatar pgal.u-szeged Committed by Commit bot

Prefix CommandLine usege with base namespace (Part 2: android_webview/)

Prefix all CommandLine usage in the android_webview/ directory with
the base:: namespace.

BUG=422426

Review URL: https://codereview.chromium.org/661443003

Cr-Commit-Position: refs/heads/master@{#301593}
parent 22a7afcf
...@@ -39,7 +39,7 @@ uint64 g_memory_override_in_bytes = 0u; ...@@ -39,7 +39,7 @@ uint64 g_memory_override_in_bytes = 0u;
// static // static
void BrowserViewRenderer::CalculateTileMemoryPolicy() { void BrowserViewRenderer::CalculateTileMemoryPolicy() {
CommandLine* cl = CommandLine::ForCurrentProcess(); base::CommandLine* cl = base::CommandLine::ForCurrentProcess();
// If the value was overridden on the command line, use the specified value. // If the value was overridden on the command line, use the specified value.
bool client_hard_limit_bytes_overridden = bool client_hard_limit_bytes_overridden =
......
...@@ -52,7 +52,8 @@ namespace { ...@@ -52,7 +52,8 @@ namespace {
void ApplyCmdlineOverridesToURLRequestContextBuilder( void ApplyCmdlineOverridesToURLRequestContextBuilder(
net::URLRequestContextBuilder* builder) { net::URLRequestContextBuilder* builder) {
const CommandLine& command_line = *CommandLine::ForCurrentProcess(); const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kHostResolverRules)) { if (command_line.HasSwitch(switches::kHostResolverRules)) {
// If hostname remappings were specified on the command-line, layer these // If hostname remappings were specified on the command-line, layer these
// rules on top of the real host resolver. This allows forwarding all // rules on top of the real host resolver. This allows forwarding all
...@@ -69,7 +70,8 @@ void ApplyCmdlineOverridesToURLRequestContextBuilder( ...@@ -69,7 +70,8 @@ void ApplyCmdlineOverridesToURLRequestContextBuilder(
void ApplyCmdlineOverridesToNetworkSessionParams( void ApplyCmdlineOverridesToNetworkSessionParams(
net::HttpNetworkSession::Params* params) { net::HttpNetworkSession::Params* params) {
int value; int value;
const CommandLine& command_line = *CommandLine::ForCurrentProcess(); const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kTestingFixedHttpPort)) { if (command_line.HasSwitch(switches::kTestingFixedHttpPort)) {
base::StringToInt(command_line.GetSwitchValueASCII( base::StringToInt(command_line.GetSwitchValueASCII(
switches::kTestingFixedHttpPort), &value); switches::kTestingFixedHttpPort), &value);
......
...@@ -28,7 +28,7 @@ namespace android_webview { ...@@ -28,7 +28,7 @@ namespace android_webview {
std::string GetUserAgent() { std::string GetUserAgent() {
// "Version/4.0" had been hardcoded in the legacy WebView. // "Version/4.0" had been hardcoded in the legacy WebView.
std::string product = "Version/4.0 " + GetProduct(); std::string product = "Version/4.0 " + GetProduct();
if (CommandLine::ForCurrentProcess()->HasSwitch( if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kUseMobileUserAgent)) { switches::kUseMobileUserAgent)) {
product += " Mobile"; product += " Mobile";
} }
......
...@@ -11,7 +11,7 @@ const char kForceAuxiliaryBitmap[] = "force-auxiliary-bitmap"; ...@@ -11,7 +11,7 @@ const char kForceAuxiliaryBitmap[] = "force-auxiliary-bitmap";
bool ForceAuxiliaryBitmap() { bool ForceAuxiliaryBitmap() {
static bool force_auxiliary_bitmap = static bool force_auxiliary_bitmap =
CommandLine::ForCurrentProcess()->HasSwitch(kForceAuxiliaryBitmap); base::CommandLine::ForCurrentProcess()->HasSwitch(kForceAuxiliaryBitmap);
return force_auxiliary_bitmap; return force_auxiliary_bitmap;
} }
......
...@@ -54,7 +54,7 @@ bool AwMainDelegate::BasicStartupComplete(int* exit_code) { ...@@ -54,7 +54,7 @@ bool AwMainDelegate::BasicStartupComplete(int* exit_code) {
BrowserViewRenderer::CalculateTileMemoryPolicy(); BrowserViewRenderer::CalculateTileMemoryPolicy();
CommandLine* cl = CommandLine::ForCurrentProcess(); base::CommandLine* cl = base::CommandLine::ForCurrentProcess();
cl->AppendSwitch(switches::kEnableBeginFrameScheduling); cl->AppendSwitch(switches::kEnableBeginFrameScheduling);
cl->AppendSwitch(switches::kEnableImplSidePainting); cl->AppendSwitch(switches::kEnableImplSidePainting);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment