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

Side by Side Diff: chrome/browser/memory_details_win.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_mac.cc ('k') | chrome/browser/metrics/metrics_service.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) 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 <psapi.h> 7 #include <psapi.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 17 matching lines...) Expand all
28 CHROME_NACL_PROCESS, 28 CHROME_NACL_PROCESS,
29 IE_BROWSER, 29 IE_BROWSER,
30 FIREFOX_BROWSER, 30 FIREFOX_BROWSER,
31 OPERA_BROWSER, 31 OPERA_BROWSER,
32 SAFARI_BROWSER, 32 SAFARI_BROWSER,
33 IE_64BIT_BROWSER, 33 IE_64BIT_BROWSER,
34 KONQUEROR_BROWSER, 34 KONQUEROR_BROWSER,
35 MAX_BROWSERS 35 MAX_BROWSERS
36 } BrowserProcess; 36 } BrowserProcess;
37 37
38 MemoryDetails::MemoryDetails() { 38 MemoryDetails::MemoryDetails()
39 : user_metrics_mode_(UPDATE_USER_METRICS) {
39 static const std::wstring google_browser_name = 40 static const std::wstring google_browser_name =
40 UTF16ToWide(l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 41 UTF16ToWide(l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
41 struct { 42 struct {
42 const wchar_t* name; 43 const wchar_t* name;
43 const wchar_t* process_name; 44 const wchar_t* process_name;
44 } process_template[MAX_BROWSERS] = { 45 } process_template[MAX_BROWSERS] = {
45 { google_browser_name.c_str(), L"chrome.exe", }, 46 { google_browser_name.c_str(), L"chrome.exe", },
46 { google_browser_name.c_str(), L"nacl64.exe", }, 47 { google_browser_name.c_str(), L"nacl64.exe", },
47 { L"IE", L"iexplore.exe", }, 48 { L"IE", L"iexplore.exe", },
48 { L"Firefox", L"firefox.exe", }, 49 { L"Firefox", L"firefox.exe", },
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } 152 }
152 break; 153 break;
153 } 154 }
154 } while (::Process32Next(snapshot, &process_entry)); 155 } while (::Process32Next(snapshot, &process_entry));
155 156
156 // Finally return to the browser thread. 157 // Finally return to the browser thread.
157 BrowserThread::PostTask( 158 BrowserThread::PostTask(
158 BrowserThread::UI, FROM_HERE, 159 BrowserThread::UI, FROM_HERE,
159 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this)); 160 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this));
160 } 161 }
OLDNEW
« no previous file with comments | « chrome/browser/memory_details_mac.cc ('k') | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698