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

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

Issue 1545223002: Switch to standard integer types in chrome/browser/, part 4 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 12 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/browser_process_task.h" 5 #include "chrome/browser/task_management/providers/browser_process_task.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/task_management/task_manager_observer.h" 8 #include "chrome/browser/task_management/task_manager_observer.h"
9 #include "chrome/common/chrome_switches.h" 9 #include "chrome/common/chrome_switches.h"
10 #include "chrome/grit/generated_resources.h" 10 #include "chrome/grit/generated_resources.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 allocated_v8_memory_(-1), 49 allocated_v8_memory_(-1),
50 used_v8_memory_(-1), 50 used_v8_memory_(-1),
51 used_sqlite_memory_(-1), 51 used_sqlite_memory_(-1),
52 reports_v8_stats_(ReportsV8Stats()){ 52 reports_v8_stats_(ReportsV8Stats()){
53 } 53 }
54 54
55 BrowserProcessTask::~BrowserProcessTask() { 55 BrowserProcessTask::~BrowserProcessTask() {
56 } 56 }
57 57
58 void BrowserProcessTask::Refresh(const base::TimeDelta& update_interval, 58 void BrowserProcessTask::Refresh(const base::TimeDelta& update_interval,
59 int64 refresh_flags) { 59 int64_t refresh_flags) {
60 Task::Refresh(update_interval, refresh_flags); 60 Task::Refresh(update_interval, refresh_flags);
61 61
62 if (reports_v8_stats_ && (refresh_flags & REFRESH_TYPE_V8_MEMORY) != 0) { 62 if (reports_v8_stats_ && (refresh_flags & REFRESH_TYPE_V8_MEMORY) != 0) {
63 allocated_v8_memory_ = 63 allocated_v8_memory_ =
64 static_cast<int64>(net::ProxyResolverV8::GetTotalHeapSize()); 64 static_cast<int64_t>(net::ProxyResolverV8::GetTotalHeapSize());
65 used_v8_memory_ = 65 used_v8_memory_ =
66 static_cast<int64>(net::ProxyResolverV8::GetUsedHeapSize()); 66 static_cast<int64_t>(net::ProxyResolverV8::GetUsedHeapSize());
67 } 67 }
68 68
69 if ((refresh_flags & REFRESH_TYPE_SQLITE_MEMORY) != 0) 69 if ((refresh_flags & REFRESH_TYPE_SQLITE_MEMORY) != 0)
70 used_sqlite_memory_ = static_cast<int64>(sqlite3_memory_used()); 70 used_sqlite_memory_ = static_cast<int64_t>(sqlite3_memory_used());
71 } 71 }
72 72
73 Task::Type BrowserProcessTask::GetType() const { 73 Task::Type BrowserProcessTask::GetType() const {
74 return Task::BROWSER; 74 return Task::BROWSER;
75 } 75 }
76 76
77 int BrowserProcessTask::GetChildProcessUniqueID() const { 77 int BrowserProcessTask::GetChildProcessUniqueID() const {
78 return 0; 78 return 0;
79 } 79 }
80 80
81 int64 BrowserProcessTask::GetSqliteMemoryUsed() const { 81 int64_t BrowserProcessTask::GetSqliteMemoryUsed() const {
82 return used_sqlite_memory_; 82 return used_sqlite_memory_;
83 } 83 }
84 84
85 int64 BrowserProcessTask::GetV8MemoryAllocated() const { 85 int64_t BrowserProcessTask::GetV8MemoryAllocated() const {
86 return allocated_v8_memory_; 86 return allocated_v8_memory_;
87 } 87 }
88 88
89 int64 BrowserProcessTask::GetV8MemoryUsed() const { 89 int64_t BrowserProcessTask::GetV8MemoryUsed() const {
90 return used_v8_memory_; 90 return used_v8_memory_;
91 } 91 }
92 92
93 } // namespace task_management 93 } // namespace task_management
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698