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

Side by Side Diff: chrome/browser/task_manager/browser_process_resource_provider.cc

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix 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
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 "chrome/browser/task_manager/browser_process_resource_provider.h" 5 #include "chrome/browser/task_manager/browser_process_resource_provider.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/profiler/scoped_tracker.h" 8 #include "base/profiler/scoped_tracker.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "chrome/browser/task_manager/resource_provider.h" 10 #include "chrome/browser/task_manager/resource_provider.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 void BrowserProcessResource::SetSupportNetworkUsage() { 122 void BrowserProcessResource::SetSupportNetworkUsage() {
123 NOTREACHED(); 123 NOTREACHED();
124 } 124 }
125 125
126 bool BrowserProcessResource::ReportsSqliteMemoryUsed() const { 126 bool BrowserProcessResource::ReportsSqliteMemoryUsed() const {
127 return true; 127 return true;
128 } 128 }
129 129
130 // BrowserProcess uses v8 for proxy resolver in certain cases. 130 // BrowserProcess uses v8 for proxy resolver in certain cases.
131 bool BrowserProcessResource::ReportsV8MemoryStats() const { 131 bool BrowserProcessResource::ReportsV8MemoryStats() const {
132 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 132 const base::CommandLine* command_line =
133 base::CommandLine::ForCurrentProcess();
133 bool using_v8 = !command_line->HasSwitch(switches::kWinHttpProxyResolver); 134 bool using_v8 = !command_line->HasSwitch(switches::kWinHttpProxyResolver);
134 if (using_v8 && command_line->HasSwitch(switches::kSingleProcess)) { 135 if (using_v8 && command_line->HasSwitch(switches::kSingleProcess)) {
135 using_v8 = false; 136 using_v8 = false;
136 } 137 }
137 return using_v8; 138 return using_v8;
138 } 139 }
139 140
140 size_t BrowserProcessResource::GetV8MemoryAllocated() const { 141 size_t BrowserProcessResource::GetV8MemoryAllocated() const {
141 return net::ProxyResolverV8::GetTotalHeapSize(); 142 return net::ProxyResolverV8::GetTotalHeapSize();
142 } 143 }
(...skipping 27 matching lines...) Expand all
170 } 171 }
171 172
172 void BrowserProcessResourceProvider::StartUpdating() { 173 void BrowserProcessResourceProvider::StartUpdating() {
173 task_manager_->AddResource(&resource_); 174 task_manager_->AddResource(&resource_);
174 } 175 }
175 176
176 void BrowserProcessResourceProvider::StopUpdating() { 177 void BrowserProcessResourceProvider::StopUpdating() {
177 } 178 }
178 179
179 } // namespace task_manager 180 } // namespace task_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698