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

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

Issue 5519016: Add a new GetInstance() method for singleton classes used in chrome/browser files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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.cc ('k') | chrome/browser/oom_priority_manager.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <unistd.h> 7 #include <unistd.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <dirent.h> 9 #include <dirent.h>
10 10
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 } 227 }
228 } 228 }
229 } 229 }
230 230
231 if (!found_parent) 231 if (!found_parent)
232 browsers_found.insert(i->pid); 232 browsers_found.insert(i->pid);
233 } 233 }
234 } 234 }
235 235
236 std::vector<pid_t> current_browser_processes; 236 std::vector<pid_t> current_browser_processes;
237 const pid_t zygote = Singleton<ZygoteHost>()->pid(); 237 const pid_t zygote = ZygoteHost::GetInstance()->pid();
238 GetAllChildren(processes, getpid(), zygote, &current_browser_processes); 238 GetAllChildren(processes, getpid(), zygote, &current_browser_processes);
239 ProcessData current_browser; 239 ProcessData current_browser;
240 GetProcessDataMemoryInformation(current_browser_processes, &current_browser); 240 GetProcessDataMemoryInformation(current_browser_processes, &current_browser);
241 current_browser.name = chrome::kBrowserAppName; 241 current_browser.name = chrome::kBrowserAppName;
242 current_browser.process_name = L"chrome"; 242 current_browser.process_name = L"chrome";
243 process_data_.push_back(current_browser); 243 process_data_.push_back(current_browser);
244 244
245 // For each browser process, collect a list of its children and get the 245 // For each browser process, collect a list of its children and get the
246 // memory usage of each. 246 // memory usage of each.
247 for (std::set<pid_t>::const_iterator 247 for (std::set<pid_t>::const_iterator
(...skipping 14 matching lines...) Expand all
262 } 262 }
263 263
264 process_data_.push_back(browser); 264 process_data_.push_back(browser);
265 } 265 }
266 266
267 // Finally return to the browser thread. 267 // Finally return to the browser thread.
268 BrowserThread::PostTask( 268 BrowserThread::PostTask(
269 BrowserThread::UI, FROM_HERE, 269 BrowserThread::UI, FROM_HERE,
270 NewRunnableMethod(this, &MemoryDetails::CollectChildInfoOnUIThread)); 270 NewRunnableMethod(this, &MemoryDetails::CollectChildInfoOnUIThread));
271 } 271 }
OLDNEW
« no previous file with comments | « chrome/browser/memory_details.cc ('k') | chrome/browser/oom_priority_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698