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

Side by Side Diff: chrome/browser/task_management/sampling/task_group.cc

Issue 1684793003: Add comments for struct members that were changed from size_t to uin32_t or uint64_t for IPC safety. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | chrome/browser/task_manager/task_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/task_management/sampling/task_group.h" 5 #include "chrome/browser/task_management/sampling/task_group.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 void TaskGroup::RefreshGpuMemory( 182 void TaskGroup::RefreshGpuMemory(
183 const content::GPUVideoMemoryUsageStats& gpu_memory_stats) { 183 const content::GPUVideoMemoryUsageStats& gpu_memory_stats) {
184 auto itr = gpu_memory_stats.process_map.find(process_id_); 184 auto itr = gpu_memory_stats.process_map.find(process_id_);
185 if (itr == gpu_memory_stats.process_map.end()) { 185 if (itr == gpu_memory_stats.process_map.end()) {
186 gpu_memory_ = -1; 186 gpu_memory_ = -1;
187 gpu_memory_has_duplicates_ = false; 187 gpu_memory_has_duplicates_ = false;
188 return; 188 return;
189 } 189 }
190 190
191 gpu_memory_ = static_cast<int64_t>(itr->second.video_memory); 191 gpu_memory_ = itr->second.video_memory;
192 gpu_memory_has_duplicates_ = itr->second.has_duplicates; 192 gpu_memory_has_duplicates_ = itr->second.has_duplicates;
193 } 193 }
194 194
195 void TaskGroup::RefreshWindowsHandles() { 195 void TaskGroup::RefreshWindowsHandles() {
196 #if defined(OS_WIN) 196 #if defined(OS_WIN)
197 GetWindowsHandles(process_handle_, 197 GetWindowsHandles(process_handle_,
198 &gdi_current_handles_, 198 &gdi_current_handles_,
199 &gdi_peak_handles_, 199 &gdi_peak_handles_,
200 &user_current_handles_, 200 &user_current_handles_,
201 &user_peak_handles_); 201 &user_peak_handles_);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 } 236 }
237 #endif // defined(OS_LINUX) 237 #endif // defined(OS_LINUX)
238 238
239 void TaskGroup::OnProcessPriorityDone(bool is_backgrounded) { 239 void TaskGroup::OnProcessPriorityDone(bool is_backgrounded) {
240 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 240 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
241 241
242 is_backgrounded_ = is_backgrounded; 242 is_backgrounded_ = is_backgrounded;
243 } 243 }
244 244
245 } // namespace task_management 245 } // namespace task_management
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/task_manager/task_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698