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

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

Issue 6676015: Coverity: Pass values by reference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win/Mac fix. Created 9 years, 9 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/net/url_info.h » ('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/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_version_info.h" 10 #include "base/file_version_info.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 process.process_name = process_template[index].process_name; 58 process.process_name = process_template[index].process_name;
59 process_data_.push_back(process); 59 process_data_.push_back(process);
60 } 60 }
61 } 61 }
62 62
63 ProcessData* MemoryDetails::ChromeBrowser() { 63 ProcessData* MemoryDetails::ChromeBrowser() {
64 return &process_data_[CHROME_BROWSER]; 64 return &process_data_[CHROME_BROWSER];
65 } 65 }
66 66
67 void MemoryDetails::CollectProcessData( 67 void MemoryDetails::CollectProcessData(
68 std::vector<ProcessMemoryInformation> child_info) { 68 const std::vector<ProcessMemoryInformation>& child_info) {
69 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 69 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
70 70
71 // Clear old data. 71 // Clear old data.
72 for (unsigned int index = 0; index < process_data_.size(); index++) 72 for (unsigned int index = 0; index < process_data_.size(); index++)
73 process_data_[index].processes.clear(); 73 process_data_[index].processes.clear();
74 74
75 base::win::WindowsArchitecture windows_architecture = 75 base::win::WindowsArchitecture windows_architecture =
76 base::win::GetWindowsArchitecture(); 76 base::win::GetWindowsArchitecture();
77 77
78 base::win::ScopedHandle snapshot( 78 base::win::ScopedHandle snapshot(
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } 151 }
152 break; 152 break;
153 } 153 }
154 } while (::Process32Next(snapshot, &process_entry)); 154 } while (::Process32Next(snapshot, &process_entry));
155 155
156 // Finally return to the browser thread. 156 // Finally return to the browser thread.
157 BrowserThread::PostTask( 157 BrowserThread::PostTask(
158 BrowserThread::UI, FROM_HERE, 158 BrowserThread::UI, FROM_HERE,
159 NewRunnableMethod(this, &MemoryDetails::CollectChildInfoOnUIThread)); 159 NewRunnableMethod(this, &MemoryDetails::CollectChildInfoOnUIThread));
160 } 160 }
OLDNEW
« no previous file with comments | « chrome/browser/memory_details_mac.cc ('k') | chrome/browser/net/url_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698