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

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

Issue 823533004: Move memory histograms generation to MetricsMemoryDetails. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Better class comment. Created 5 years, 11 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
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 <psapi.h> 7 #include <psapi.h>
8 #include <TlHelp32.h> 8 #include <TlHelp32.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 19 matching lines...) Expand all
30 CHROME_NACL_PROCESS, 30 CHROME_NACL_PROCESS,
31 IE_BROWSER, 31 IE_BROWSER,
32 FIREFOX_BROWSER, 32 FIREFOX_BROWSER,
33 OPERA_BROWSER, 33 OPERA_BROWSER,
34 SAFARI_BROWSER, 34 SAFARI_BROWSER,
35 IE_64BIT_BROWSER, 35 IE_64BIT_BROWSER,
36 KONQUEROR_BROWSER, 36 KONQUEROR_BROWSER,
37 MAX_BROWSERS 37 MAX_BROWSERS
38 } BrowserProcess; 38 } BrowserProcess;
39 39
40 MemoryDetails::MemoryDetails() 40 MemoryDetails::MemoryDetails() {
41 : user_metrics_mode_(UPDATE_USER_METRICS),
42 memory_growth_tracker_(NULL) {
43 base::FilePath browser_process_path; 41 base::FilePath browser_process_path;
44 PathService::Get(base::FILE_EXE, &browser_process_path); 42 PathService::Get(base::FILE_EXE, &browser_process_path);
45 const base::string16 browser_process_name = 43 const base::string16 browser_process_name =
46 browser_process_path.BaseName().value(); 44 browser_process_path.BaseName().value();
47 const base::string16 google_browser_name = 45 const base::string16 google_browser_name =
48 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); 46 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME);
49 47
50 struct { 48 struct {
51 const wchar_t* name; 49 const wchar_t* name;
52 const wchar_t* process_name; 50 const wchar_t* process_name;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 158 }
161 break; 159 break;
162 } 160 }
163 } while (::Process32Next(snapshot.Get(), &process_entry)); 161 } while (::Process32Next(snapshot.Get(), &process_entry));
164 162
165 // Finally return to the browser thread. 163 // Finally return to the browser thread.
166 BrowserThread::PostTask( 164 BrowserThread::PostTask(
167 BrowserThread::UI, FROM_HERE, 165 BrowserThread::UI, FROM_HERE,
168 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this)); 166 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this));
169 } 167 }
OLDNEW
« no previous file with comments | « chrome/browser/memory_details_mac.cc ('k') | chrome/browser/metrics/chrome_metrics_service_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698