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

Side by Side Diff: chrome/browser/memory_details_mac.cc

Issue 10151005: cros: Log per-process memory use on low memory events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/memory_details_linux.cc ('k') | chrome/browser/memory_details_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/memory_details.h" 5 #include "chrome/browser/memory_details.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 30 matching lines...) Expand all
41 CHROME_BROWSER = 0, 41 CHROME_BROWSER = 0,
42 SAFARI_BROWSER, 42 SAFARI_BROWSER,
43 FIREFOX_BROWSER, 43 FIREFOX_BROWSER,
44 CAMINO_BROWSER, 44 CAMINO_BROWSER,
45 OPERA_BROWSER, 45 OPERA_BROWSER,
46 OMNIWEB_BROWSER, 46 OMNIWEB_BROWSER,
47 MAX_BROWSERS 47 MAX_BROWSERS
48 } BrowserProcess; 48 } BrowserProcess;
49 49
50 50
51 MemoryDetails::MemoryDetails() { 51 MemoryDetails::MemoryDetails()
52 : user_metrics_mode_(UPDATE_USER_METRICS) {
52 const std::string google_browser_name = 53 const std::string google_browser_name =
53 l10n_util::GetStringUTF8(IDS_PRODUCT_NAME); 54 l10n_util::GetStringUTF8(IDS_PRODUCT_NAME);
54 // (Human and process) names of browsers; should match the ordering for 55 // (Human and process) names of browsers; should match the ordering for
55 // |BrowserProcess| (i.e., |BrowserType|). 56 // |BrowserProcess| (i.e., |BrowserType|).
56 // TODO(viettrungluu): The current setup means that we can't detect both 57 // TODO(viettrungluu): The current setup means that we can't detect both
57 // Chrome and Chromium at the same time! 58 // Chrome and Chromium at the same time!
58 // TODO(viettrungluu): Get localized browser names for other browsers 59 // TODO(viettrungluu): Get localized browser names for other browsers
59 // (crbug.com/25779). 60 // (crbug.com/25779).
60 struct { 61 struct {
61 const char* name; 62 const char* name;
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 } 231 }
231 } 232 }
232 233
233 // Memory info. 234 // Memory info.
234 process_info.GetCommittedKBytesOfPID(info.pid, &info.committed); 235 process_info.GetCommittedKBytesOfPID(info.pid, &info.committed);
235 process_info.GetWorkingSetKBytesOfPID(info.pid, &info.working_set); 236 process_info.GetWorkingSetKBytesOfPID(info.pid, &info.working_set);
236 237
237 // Add the process info to our list. 238 // Add the process info to our list.
238 process_data_[CHROME_BROWSER].processes.push_back(info); 239 process_data_[CHROME_BROWSER].processes.push_back(info);
239 } 240 }
OLDNEW
« no previous file with comments | « chrome/browser/memory_details_linux.cc ('k') | chrome/browser/memory_details_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698