OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 SAFARI_BROWSER, | 46 SAFARI_BROWSER, |
47 FIREFOX_BROWSER, | 47 FIREFOX_BROWSER, |
48 CAMINO_BROWSER, | 48 CAMINO_BROWSER, |
49 OPERA_BROWSER, | 49 OPERA_BROWSER, |
50 OMNIWEB_BROWSER, | 50 OMNIWEB_BROWSER, |
51 MAX_BROWSERS | 51 MAX_BROWSERS |
52 } BrowserProcess; | 52 } BrowserProcess; |
53 | 53 |
54 | 54 |
55 MemoryDetails::MemoryDetails() { | 55 MemoryDetails::MemoryDetails() { |
56 static const std::string google_browser_name = | 56 const std::string google_browser_name = |
57 l10n_util::GetStringUTF8(IDS_PRODUCT_NAME); | 57 l10n_util::GetStringUTF8(IDS_PRODUCT_NAME); |
58 // (Human and process) names of browsers; should match the ordering for | 58 // (Human and process) names of browsers; should match the ordering for |
59 // |BrowserProcess| (i.e., |BrowserType|). | 59 // |BrowserProcess| (i.e., |BrowserType|). |
60 // TODO(viettrungluu): The current setup means that we can't detect both | 60 // TODO(viettrungluu): The current setup means that we can't detect both |
61 // Chrome and Chromium at the same time! | 61 // Chrome and Chromium at the same time! |
62 // TODO(viettrungluu): Get localized browser names for other browsers | 62 // TODO(viettrungluu): Get localized browser names for other browsers |
63 // (crbug.com/25779). | 63 // (crbug.com/25779). |
64 struct { | 64 struct { |
65 const char* name; | 65 const char* name; |
66 const char* process_name; | 66 const char* process_name; |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 } | 234 } |
235 } | 235 } |
236 | 236 |
237 // Memory info. | 237 // Memory info. |
238 process_info.GetCommittedKBytesOfPID(info.pid, &info.committed); | 238 process_info.GetCommittedKBytesOfPID(info.pid, &info.committed); |
239 process_info.GetWorkingSetKBytesOfPID(info.pid, &info.working_set); | 239 process_info.GetWorkingSetKBytesOfPID(info.pid, &info.working_set); |
240 | 240 |
241 // Add the process info to our list. | 241 // Add the process info to our list. |
242 process_data_[CHROME_BROWSER].processes.push_back(info); | 242 process_data_[CHROME_BROWSER].processes.push_back(info); |
243 } | 243 } |
OLD | NEW |