| 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/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 25 matching lines...) Expand all Loading... |
| 36 const base::CommandLine* command_line = | 36 const base::CommandLine* command_line = |
| 37 base::CommandLine::ForCurrentProcess(); | 37 base::CommandLine::ForCurrentProcess(); |
| 38 return !command_line->HasSwitch(switches::kWinHttpProxyResolver) && | 38 return !command_line->HasSwitch(switches::kWinHttpProxyResolver) && |
| 39 !command_line->HasSwitch(switches::kSingleProcess); | 39 !command_line->HasSwitch(switches::kSingleProcess); |
| 40 } | 40 } |
| 41 | 41 |
| 42 } // namespace | 42 } // namespace |
| 43 | 43 |
| 44 BrowserProcessTask::BrowserProcessTask() | 44 BrowserProcessTask::BrowserProcessTask() |
| 45 : Task(l10n_util::GetStringUTF16(IDS_TASK_MANAGER_WEB_BROWSER_CELL_TEXT), | 45 : Task(l10n_util::GetStringUTF16(IDS_TASK_MANAGER_WEB_BROWSER_CELL_TEXT), |
| 46 "Browser Process", |
| 46 GetDefaultIcon(), | 47 GetDefaultIcon(), |
| 47 base::GetCurrentProcessHandle()), | 48 base::GetCurrentProcessHandle()), |
| 48 allocated_v8_memory_(-1), | 49 allocated_v8_memory_(-1), |
| 49 used_v8_memory_(-1), | 50 used_v8_memory_(-1), |
| 50 used_sqlite_memory_(-1), | 51 used_sqlite_memory_(-1), |
| 51 reports_v8_stats_(ReportsV8Stats()){ | 52 reports_v8_stats_(ReportsV8Stats()){ |
| 52 } | 53 } |
| 53 | 54 |
| 54 BrowserProcessTask::~BrowserProcessTask() { | 55 BrowserProcessTask::~BrowserProcessTask() { |
| 55 } | 56 } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 83 | 84 |
| 84 int64 BrowserProcessTask::GetV8MemoryAllocated() const { | 85 int64 BrowserProcessTask::GetV8MemoryAllocated() const { |
| 85 return allocated_v8_memory_; | 86 return allocated_v8_memory_; |
| 86 } | 87 } |
| 87 | 88 |
| 88 int64 BrowserProcessTask::GetV8MemoryUsed() const { | 89 int64 BrowserProcessTask::GetV8MemoryUsed() const { |
| 89 return used_v8_memory_; | 90 return used_v8_memory_; |
| 90 } | 91 } |
| 91 | 92 |
| 92 } // namespace task_management | 93 } // namespace task_management |
| OLD | NEW |