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

Side by Side Diff: chrome/browser/ui/webui/memory_internals/memory_internals_proxy.cc

Issue 823533004: Move memory histograms generation to MetricsMemoryDetails. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Better class comment. Created 5 years, 11 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
« no previous file with comments | « chrome/browser/ui/webui/about_ui.cc ('k') | chrome/chrome_browser.gypi » ('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 "chrome/browser/ui/webui/memory_internals/memory_internals_proxy.h" 5 #include "chrome/browser/ui/webui/memory_internals/memory_internals_proxy.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 handler_ = NULL; 195 handler_ = NULL;
196 } 196 }
197 197
198 void MemoryInternalsProxy::StartFetch(const base::ListValue* list) { 198 void MemoryInternalsProxy::StartFetch(const base::ListValue* list) {
199 DCHECK_CURRENTLY_ON(BrowserThread::UI); 199 DCHECK_CURRENTLY_ON(BrowserThread::UI);
200 200
201 // Clear previous information before fetching new information. 201 // Clear previous information before fetching new information.
202 information_->Clear(); 202 information_->Clear();
203 scoped_refptr<ProcessDetails> process(new ProcessDetails( 203 scoped_refptr<ProcessDetails> process(new ProcessDetails(
204 base::Bind(&MemoryInternalsProxy::OnProcessAvailable, this))); 204 base::Bind(&MemoryInternalsProxy::OnProcessAvailable, this)));
205 process->StartFetch(MemoryDetails::SKIP_USER_METRICS); 205 process->StartFetch();
206 } 206 }
207 207
208 MemoryInternalsProxy::~MemoryInternalsProxy() {} 208 MemoryInternalsProxy::~MemoryInternalsProxy() {}
209 209
210 void MemoryInternalsProxy::RequestRendererDetails() { 210 void MemoryInternalsProxy::RequestRendererDetails() {
211 renderer_details_->Clear(); 211 renderer_details_->Clear();
212 212
213 #if defined(OS_ANDROID) 213 #if defined(OS_ANDROID)
214 for (TabModelList::const_iterator iter = TabModelList::begin(); 214 for (TabModelList::const_iterator iter = TabModelList::begin();
215 iter != TabModelList::end(); ++iter) { 215 iter != TabModelList::end(); ++iter) {
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 const std::string& function, const base::Value& args) { 347 const std::string& function, const base::Value& args) {
348 DCHECK_CURRENTLY_ON(BrowserThread::UI); 348 DCHECK_CURRENTLY_ON(BrowserThread::UI);
349 349
350 std::vector<const base::Value*> args_vector(1, &args); 350 std::vector<const base::Value*> args_vector(1, &args);
351 base::string16 update = 351 base::string16 update =
352 content::WebUI::GetJavascriptCall(function, args_vector); 352 content::WebUI::GetJavascriptCall(function, args_vector);
353 // Don't forward updates to a destructed UI. 353 // Don't forward updates to a destructed UI.
354 if (handler_) 354 if (handler_)
355 handler_->OnUpdate(update); 355 handler_->OnUpdate(update);
356 } 356 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/about_ui.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698