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

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

Issue 3010037: Add the actual data being read to the OnBytesRead callback, take two.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/task_manager.h ('k') | net/net.gyp » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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.h" 5 #include "chrome/browser/task_manager.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/i18n/number_formatting.h" 10 #include "base/i18n/number_formatting.h"
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 830
831 void TaskManagerModel::OnJobDone(URLRequestJob* job, 831 void TaskManagerModel::OnJobDone(URLRequestJob* job,
832 const URLRequestStatus& status) { 832 const URLRequestStatus& status) {
833 } 833 }
834 834
835 void TaskManagerModel::OnJobRedirect(URLRequestJob* job, 835 void TaskManagerModel::OnJobRedirect(URLRequestJob* job,
836 const GURL& location, 836 const GURL& location,
837 int status_code) { 837 int status_code) {
838 } 838 }
839 839
840 void TaskManagerModel::OnBytesRead(URLRequestJob* job, int byte_count) { 840 void TaskManagerModel::OnBytesRead(URLRequestJob* job, const char* buf,
841 int byte_count) {
841 int render_process_host_child_id = -1, routing_id = -1; 842 int render_process_host_child_id = -1, routing_id = -1;
842 ResourceDispatcherHost::RenderViewForRequest(job->request(), 843 ResourceDispatcherHost::RenderViewForRequest(job->request(),
843 &render_process_host_child_id, 844 &render_process_host_child_id,
844 &routing_id); 845 &routing_id);
845 // This happens in the IO thread, post it to the UI thread. 846 // This happens in the IO thread, post it to the UI thread.
846 int origin_child_id = 847 int origin_child_id =
847 chrome_browser_net::GetOriginProcessUniqueIDForRequest(job->request()); 848 chrome_browser_net::GetOriginProcessUniqueIDForRequest(job->request());
848 ChromeThread::PostTask( 849 ChromeThread::PostTask(
849 ChromeThread::UI, FROM_HERE, 850 ChromeThread::UI, FROM_HERE,
850 NewRunnableMethod( 851 NewRunnableMethod(
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 MetricsMap::const_iterator iter = metrics_map_.find(handle); 974 MetricsMap::const_iterator iter = metrics_map_.find(handle);
974 if (iter == metrics_map_.end()) 975 if (iter == metrics_map_.end())
975 return false; 976 return false;
976 977
977 if (!iter->second->GetMemoryBytes(&usage->first, &usage->second)) 978 if (!iter->second->GetMemoryBytes(&usage->first, &usage->second))
978 return false; 979 return false;
979 980
980 memory_usage_map_.insert(std::make_pair(handle, *usage)); 981 memory_usage_map_.insert(std::make_pair(handle, *usage));
981 return true; 982 return true;
982 } 983 }
OLDNEW
« no previous file with comments | « chrome/browser/task_manager.h ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698