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

Side by Side Diff: chrome/browser/memory_details.h

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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_MEMORY_DETAILS_H_ 5 #ifndef CHROME_BROWSER_MEMORY_DETAILS_H_
6 #define CHROME_BROWSER_MEMORY_DETAILS_H_ 6 #define CHROME_BROWSER_MEMORY_DETAILS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // invokes back to the file thread to run the rest of the about:memory 115 // invokes back to the file thread to run the rest of the about:memory
116 // functionality. 116 // functionality.
117 void CollectChildInfoOnIOThread(); 117 void CollectChildInfoOnIOThread();
118 118
119 // Collect current process information from the OS and store it 119 // Collect current process information from the OS and store it
120 // for processing. If data has already been collected, clears old 120 // for processing. If data has already been collected, clears old
121 // data and re-collects the data. 121 // data and re-collects the data.
122 // Note - this function enumerates memory details from many processes 122 // Note - this function enumerates memory details from many processes
123 // and is fairly expensive to run, hence it's run on the file thread. 123 // and is fairly expensive to run, hence it's run on the file thread.
124 // The parameter holds information about processes from the IO thread. 124 // The parameter holds information about processes from the IO thread.
125 void CollectProcessData(std::vector<ProcessMemoryInformation>); 125 void CollectProcessData(const std::vector<ProcessMemoryInformation>&);
126 126
127 #if defined(OS_MACOSX) 127 #if defined(OS_MACOSX)
128 // A helper for |CollectProcessData()|, collecting data on the Chrome/Chromium 128 // A helper for |CollectProcessData()|, collecting data on the Chrome/Chromium
129 // process with PID |pid|. The collected data is added to the state of the 129 // process with PID |pid|. The collected data is added to the state of the
130 // object (in |process_data_|). 130 // object (in |process_data_|).
131 void CollectProcessDataChrome( 131 void CollectProcessDataChrome(
132 const std::vector<ProcessMemoryInformation>& child_info, 132 const std::vector<ProcessMemoryInformation>& child_info,
133 base::ProcessId pid, 133 base::ProcessId pid,
134 const ProcessInfoSnapshot& process_info); 134 const ProcessInfoSnapshot& process_info);
135 #endif 135 #endif
136 136
137 // Collect child process information on the UI thread. Information about 137 // Collect child process information on the UI thread. Information about
138 // renderer processes is only available there. 138 // renderer processes is only available there.
139 void CollectChildInfoOnUIThread(); 139 void CollectChildInfoOnUIThread();
140 140
141 // Each time we take a memory sample, we do a little work to update 141 // Each time we take a memory sample, we do a little work to update
142 // the global histograms for tracking memory usage. 142 // the global histograms for tracking memory usage.
143 void UpdateHistograms(); 143 void UpdateHistograms();
144 144
145 // Returns a pointer to the ProcessData structure for Chrome. 145 // Returns a pointer to the ProcessData structure for Chrome.
146 ProcessData* ChromeBrowser(); 146 ProcessData* ChromeBrowser();
147 147
148 std::vector<ProcessData> process_data_; 148 std::vector<ProcessData> process_data_;
149 149
150 DISALLOW_COPY_AND_ASSIGN(MemoryDetails); 150 DISALLOW_COPY_AND_ASSIGN(MemoryDetails);
151 }; 151 };
152 152
153 #endif // CHROME_BROWSER_MEMORY_DETAILS_H_ 153 #endif // CHROME_BROWSER_MEMORY_DETAILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/image_loading_tracker.cc ('k') | chrome/browser/memory_details_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698