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

Side by Side Diff: chrome/browser/task_management/providers/task.cc

Issue 1584473004: Migrate ProcessesEventRouter to the new task manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rearrange some code to make it easier to review. Created 4 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_management/providers/task.h" 5 #include "chrome/browser/task_management/providers/task.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/process/process.h" 9 #include "base/process/process.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 current_byte_count_ = 0; 78 current_byte_count_ = 0;
79 } 79 }
80 80
81 void Task::OnNetworkBytesRead(int64_t bytes_read) { 81 void Task::OnNetworkBytesRead(int64_t bytes_read) {
82 if (current_byte_count_ == -1) 82 if (current_byte_count_ == -1)
83 current_byte_count_ = 0; 83 current_byte_count_ = 0;
84 84
85 current_byte_count_ += bytes_read; 85 current_byte_count_ += bytes_read;
86 } 86 }
87 87
88 void Task::GetTerminationStatus(base::TerminationStatus* out_status,
89 int* out_error_code) const {
90 DCHECK(out_status);
91 DCHECK(out_error_code);
92
93 *out_status = base::TERMINATION_STATUS_STILL_RUNNING;
94 *out_error_code = 0;
95 }
96
88 base::string16 Task::GetProfileName() const { 97 base::string16 Task::GetProfileName() const {
89 return base::string16(); 98 return base::string16();
90 } 99 }
91 100
101 int Task::GetTabId() const {
102 return -1;
103 }
104
92 bool Task::ReportsSqliteMemory() const { 105 bool Task::ReportsSqliteMemory() const {
93 return GetSqliteMemoryUsed() != -1; 106 return GetSqliteMemoryUsed() != -1;
94 } 107 }
95 108
96 int64_t Task::GetSqliteMemoryUsed() const { 109 int64_t Task::GetSqliteMemoryUsed() const {
97 return -1; 110 return -1;
98 } 111 }
99 112
100 bool Task::ReportsV8Memory() const { 113 bool Task::ReportsV8Memory() const {
101 return GetV8MemoryAllocated() != -1; 114 return GetV8MemoryAllocated() != -1;
(...skipping 13 matching lines...) Expand all
115 128
116 blink::WebCache::ResourceTypeStats Task::GetWebCacheStats() const { 129 blink::WebCache::ResourceTypeStats Task::GetWebCacheStats() const {
117 return blink::WebCache::ResourceTypeStats(); 130 return blink::WebCache::ResourceTypeStats();
118 } 131 }
119 132
120 bool Task::ReportsNetworkUsage() const { 133 bool Task::ReportsNetworkUsage() const {
121 return network_usage_ != -1; 134 return network_usage_ != -1;
122 } 135 }
123 136
124 } // namespace task_management 137 } // namespace task_management
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698