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

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

Issue 811563009: CollectProcessData fails to find known browsers properly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | 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) 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 <sys/types.h> 7 #include <sys/types.h>
8 #include <unistd.h> 8 #include <unistd.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 process_map.find(current_process.parent); 185 process_map.find(current_process.parent);
186 if (parent_iter == process_map.end()) { 186 if (parent_iter == process_map.end()) {
187 browsers_found.insert(current_process.pid); 187 browsers_found.insert(current_process.pid);
188 continue; 188 continue;
189 } 189 }
190 190
191 if (GetBrowserType(parent_iter->second.name) != type) { 191 if (GetBrowserType(parent_iter->second.name) != type) {
192 // We found a process whose type is diffent from its parent's type. 192 // We found a process whose type is diffent from its parent's type.
193 // That means it is the root process of the browser. 193 // That means it is the root process of the browser.
194 browsers_found.insert(current_process.pid); 194 browsers_found.insert(current_process.pid);
195 break; 195 continue;
196 } 196 }
197 } 197 }
198 198
199 ProcessData current_browser = 199 ProcessData current_browser =
200 GetProcessDataMemoryInformation(GetAllChildren(process_map, getpid())); 200 GetProcessDataMemoryInformation(GetAllChildren(process_map, getpid()));
201 current_browser.name = l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME); 201 current_browser.name = l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME);
202 current_browser.process_name = base::ASCIIToUTF16("chrome"); 202 current_browser.process_name = base::ASCIIToUTF16("chrome");
203 203
204 for (std::vector<ProcessMemoryInformation>::iterator 204 for (std::vector<ProcessMemoryInformation>::iterator
205 i = current_browser.processes.begin(); 205 i = current_browser.processes.begin();
(...skipping 30 matching lines...) Expand all
236 236
237 #if defined(OS_CHROMEOS) 237 #if defined(OS_CHROMEOS)
238 base::GetSwapInfo(&swap_info_); 238 base::GetSwapInfo(&swap_info_);
239 #endif 239 #endif
240 240
241 // Finally return to the browser thread. 241 // Finally return to the browser thread.
242 BrowserThread::PostTask( 242 BrowserThread::PostTask(
243 BrowserThread::UI, FROM_HERE, 243 BrowserThread::UI, FROM_HERE,
244 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this)); 244 base::Bind(&MemoryDetails::CollectChildInfoOnUIThread, this));
245 } 245 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698