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

Side by Side Diff: android_webview/browser/browser_view_renderer.cc

Issue 661443003: Prefix CommandLine usege with base namespace (Part 2: android_webview/) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "android_webview/browser/browser_view_renderer.h" 5 #include "android_webview/browser/browser_view_renderer.h"
6 6
7 #include "android_webview/browser/browser_view_renderer_client.h" 7 #include "android_webview/browser/browser_view_renderer_client.h"
8 #include "android_webview/browser/shared_renderer_state.h" 8 #include "android_webview/browser/shared_renderer_state.h"
9 #include "android_webview/common/aw_switches.h" 9 #include "android_webview/common/aw_switches.h"
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 30 matching lines...) Expand all
41 const size_t kTileMultiplier = 12; 41 const size_t kTileMultiplier = 12;
42 const size_t kTileAllocationStep = 20; 42 const size_t kTileAllocationStep = 20;
43 // Use chrome's default tile size, which varies from 256 to 512. 43 // Use chrome's default tile size, which varies from 256 to 512.
44 // Be conservative here and use the smallest tile size possible. 44 // Be conservative here and use the smallest tile size possible.
45 const size_t kTileArea = 256 * 256; 45 const size_t kTileArea = 256 * 256;
46 46
47 } // namespace 47 } // namespace
48 48
49 // static 49 // static
50 void BrowserViewRenderer::CalculateTileMemoryPolicy() { 50 void BrowserViewRenderer::CalculateTileMemoryPolicy() {
51 CommandLine* cl = CommandLine::ForCurrentProcess(); 51 base::CommandLine* cl = base::CommandLine::ForCurrentProcess();
52 52
53 // If the value was overridden on the command line, use the specified value. 53 // If the value was overridden on the command line, use the specified value.
54 bool client_hard_limit_bytes_overridden = 54 bool client_hard_limit_bytes_overridden =
55 cl->HasSwitch(switches::kForceGpuMemAvailableMb); 55 cl->HasSwitch(switches::kForceGpuMemAvailableMb);
56 if (client_hard_limit_bytes_overridden) { 56 if (client_hard_limit_bytes_overridden) {
57 base::StringToUint64( 57 base::StringToUint64(
58 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 58 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
59 switches::kForceGpuMemAvailableMb), 59 switches::kForceGpuMemAvailableMb),
60 &g_memory_override_in_bytes); 60 &g_memory_override_in_bytes);
61 g_memory_override_in_bytes *= 1024 * 1024; 61 g_memory_override_in_bytes *= 1024 * 1024;
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 base::StringAppendF(&str, 768 base::StringAppendF(&str,
769 "overscroll_rounding_error_: %s ", 769 "overscroll_rounding_error_: %s ",
770 overscroll_rounding_error_.ToString().c_str()); 770 overscroll_rounding_error_.ToString().c_str());
771 base::StringAppendF( 771 base::StringAppendF(
772 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); 772 &str, "on_new_picture_enable: %d ", on_new_picture_enable_);
773 base::StringAppendF(&str, "clear_view: %d ", clear_view_); 773 base::StringAppendF(&str, "clear_view: %d ", clear_view_);
774 return str; 774 return str;
775 } 775 }
776 776
777 } // namespace android_webview 777 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698