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

Side by Side Diff: chrome/browser/memory_details_linux.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_android.cc ('k') | chrome/browser/memory_details_mac.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 <dirent.h> 7 #include <dirent.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <unistd.h> 9 #include <unistd.h>
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 { "firefox-bin", FIREFOX }, 60 { "firefox-bin", FIREFOX },
61 { "iceweasel", ICEWEASEL }, 61 { "iceweasel", ICEWEASEL },
62 { "opera", OPERA }, 62 { "opera", OPERA },
63 { "konqueror", KONQUEROR }, 63 { "konqueror", KONQUEROR },
64 { "epiphany-browse", EPIPHANY }, 64 { "epiphany-browse", EPIPHANY },
65 { "epiphany", EPIPHANY }, 65 { "epiphany", EPIPHANY },
66 { "midori", MIDORI }, 66 { "midori", MIDORI },
67 { "", MAX_BROWSERS }, 67 { "", MAX_BROWSERS },
68 }; 68 };
69 69
70 MemoryDetails::MemoryDetails() { 70 MemoryDetails::MemoryDetails()
71 : user_metrics_mode_(UPDATE_USER_METRICS) {
71 } 72 }
72 73
73 ProcessData* MemoryDetails::ChromeBrowser() { 74 ProcessData* MemoryDetails::ChromeBrowser() {
74 return &process_data_[0]; 75 return &process_data_[0];
75 } 76 }
76 77
77 struct Process { 78 struct Process {
78 pid_t pid; 79 pid_t pid;
79 pid_t parent; 80 pid_t parent;
80 std::string name; 81 std::string name;
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 } 283 }
283 284
284 process_data_.push_back(browser); 285 process_data_.push_back(browser);
285 } 286 }
286 287
287 // Finally return to the browser thread. 288 // Finally return to the browser thread.
288 BrowserThread::PostTask( 289 BrowserThread::PostTask(
289 BrowserThread::UI, FROM_HERE, 290 BrowserThread::UI, FROM_HERE,
290 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this)); 291 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this));
291 } 292 }
OLDNEW
« no previous file with comments | « chrome/browser/memory_details_android.cc ('k') | chrome/browser/memory_details_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698