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

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

Issue 1374283003: Reporting top cpu and memory consumers via rappor on chromeos (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using literals for UMA histograms Created 5 years, 1 month 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 25 matching lines...) Expand all
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698