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

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

Issue 1284993005: Notify NetworkDelegate when bytes have been received over the network. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed empty cronet OnRawBytesRead implementation Created 5 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/task_manager.h" 5 #include "chrome/browser/task_manager/task_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/i18n/number_formatting.h" 8 #include "base/i18n/number_formatting.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 } 1242 }
1243 1243
1244 void TaskManagerModel::NotifyVideoMemoryUsageStats( 1244 void TaskManagerModel::NotifyVideoMemoryUsageStats(
1245 const content::GPUVideoMemoryUsageStats& video_memory_usage_stats) { 1245 const content::GPUVideoMemoryUsageStats& video_memory_usage_stats) {
1246 DCHECK(pending_video_memory_usage_stats_update_); 1246 DCHECK(pending_video_memory_usage_stats_update_);
1247 video_memory_usage_stats_ = video_memory_usage_stats; 1247 video_memory_usage_stats_ = video_memory_usage_stats;
1248 pending_video_memory_usage_stats_update_ = false; 1248 pending_video_memory_usage_stats_update_ = false;
1249 } 1249 }
1250 1250
1251 void TaskManagerModel::NotifyBytesRead(const net::URLRequest& request, 1251 void TaskManagerModel::NotifyBytesRead(const net::URLRequest& request,
1252 int byte_count) { 1252 int64_t byte_count) {
1253 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 1253 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
1254 if (!is_updating_byte_count_) 1254 if (!is_updating_byte_count_)
1255 return; 1255 return;
1256 1256
1257 // Only net::URLRequestJob instances created by the ResourceDispatcherHost 1257 // Only net::URLRequestJob instances created by the ResourceDispatcherHost
1258 // have an associated ResourceRequestInfo and a render frame associated. 1258 // have an associated ResourceRequestInfo and a render frame associated.
1259 // All other jobs will have -1 returned for the render process child and 1259 // All other jobs will have -1 returned for the render process child and
1260 // routing ids - the jobs may still match a resource based on their origin id, 1260 // routing ids - the jobs may still match a resource based on their origin id,
1261 // otherwise BytesRead() will attribute the activity to the Browser resource. 1261 // otherwise BytesRead() will attribute the activity to the Browser resource.
1262 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(&request); 1262 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(&request);
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 params.host_desktop_type = desktop_type; 1566 params.host_desktop_type = desktop_type;
1567 chrome::Navigate(&params); 1567 chrome::Navigate(&params);
1568 } 1568 }
1569 1569
1570 TaskManager::TaskManager() 1570 TaskManager::TaskManager()
1571 : model_(new TaskManagerModel(this)) { 1571 : model_(new TaskManagerModel(this)) {
1572 } 1572 }
1573 1573
1574 TaskManager::~TaskManager() { 1574 TaskManager::~TaskManager() {
1575 } 1575 }
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/task_manager.h ('k') | components/cronet/android/cronet_url_request_context_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698