| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |