| OLD | NEW |
| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 current_byte_count_ = 0; | 79 current_byte_count_ = 0; |
| 80 } | 80 } |
| 81 | 81 |
| 82 void Task::OnNetworkBytesRead(int64_t bytes_read) { | 82 void Task::OnNetworkBytesRead(int64_t bytes_read) { |
| 83 if (current_byte_count_ == -1) | 83 if (current_byte_count_ == -1) |
| 84 current_byte_count_ = 0; | 84 current_byte_count_ = 0; |
| 85 | 85 |
| 86 current_byte_count_ += bytes_read; | 86 current_byte_count_ += bytes_read; |
| 87 } | 87 } |
| 88 | 88 |
| 89 void Task::GetTerminationStatus(base::TerminationStatus* out_status, |
| 90 int* out_error_code) const { |
| 91 DCHECK(out_status); |
| 92 DCHECK(out_error_code); |
| 93 |
| 94 *out_status = base::TERMINATION_STATUS_STILL_RUNNING; |
| 95 *out_error_code = 0; |
| 96 } |
| 97 |
| 89 base::string16 Task::GetProfileName() const { | 98 base::string16 Task::GetProfileName() const { |
| 90 return base::string16(); | 99 return base::string16(); |
| 91 } | 100 } |
| 92 | 101 |
| 102 int Task::GetTabId() const { |
| 103 return -1; |
| 104 } |
| 105 |
| 93 bool Task::ReportsSqliteMemory() const { | 106 bool Task::ReportsSqliteMemory() const { |
| 94 return GetSqliteMemoryUsed() != -1; | 107 return GetSqliteMemoryUsed() != -1; |
| 95 } | 108 } |
| 96 | 109 |
| 97 int64_t Task::GetSqliteMemoryUsed() const { | 110 int64_t Task::GetSqliteMemoryUsed() const { |
| 98 return -1; | 111 return -1; |
| 99 } | 112 } |
| 100 | 113 |
| 101 bool Task::ReportsV8Memory() const { | 114 bool Task::ReportsV8Memory() const { |
| 102 return GetV8MemoryAllocated() != -1; | 115 return GetV8MemoryAllocated() != -1; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 116 | 129 |
| 117 blink::WebCache::ResourceTypeStats Task::GetWebCacheStats() const { | 130 blink::WebCache::ResourceTypeStats Task::GetWebCacheStats() const { |
| 118 return blink::WebCache::ResourceTypeStats(); | 131 return blink::WebCache::ResourceTypeStats(); |
| 119 } | 132 } |
| 120 | 133 |
| 121 bool Task::ReportsNetworkUsage() const { | 134 bool Task::ReportsNetworkUsage() const { |
| 122 return network_usage_ != -1; | 135 return network_usage_ != -1; |
| 123 } | 136 } |
| 124 | 137 |
| 125 } // namespace task_management | 138 } // namespace task_management |
| OLD | NEW |