| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |