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

Side by Side Diff: chrome/browser/power/process_power_collector.cc

Issue 1548133002: Switch to standard integer types in chrome/browser/, part 3 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/power/process_power_collector.h" 5 #include "chrome/browser/power/process_power_collector.h"
6 6
7 #include "base/process/process_handle.h" 7 #include "base/process/process_handle.h"
8 #include "base/process/process_metrics.h" 8 #include "base/process/process_metrics.h"
9 #include "build/build_config.h"
9 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/profiles/profile_manager.h" 12 #include "chrome/browser/profiles/profile_manager.h"
12 #include "chrome/browser/ui/tab_contents/tab_contents_iterator.h" 13 #include "chrome/browser/ui/tab_contents/tab_contents_iterator.h"
13 #include "components/power/origin_power_map.h" 14 #include "components/power/origin_power_map.h"
14 #include "components/power/origin_power_map_factory.h" 15 #include "components/power/origin_power_map_factory.h"
15 #include "content/public/browser/browser_context.h" 16 #include "content/public/browser/browser_context.h"
16 #include "content/public/browser/render_process_host.h" 17 #include "content/public/browser/render_process_host.h"
17 #include "content/public/browser/web_contents.h" 18 #include "content/public/browser/web_contents.h"
18 #include "extensions/browser/app_window/app_window.h" 19 #include "extensions/browser/app_window/app_window.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 origin, 209 origin,
209 Profile::FromBrowserContext(rph->GetBrowserContext()))); 210 Profile::FromBrowserContext(rph->GetBrowserContext())));
210 } 211 }
211 212
212 linked_ptr<PerProcessData>& process_data = metrics_map_[handle]; 213 linked_ptr<PerProcessData>& process_data = metrics_map_[handle];
213 process_data->set_last_cpu_percent(std::max(0.0, 214 process_data->set_last_cpu_percent(std::max(0.0,
214 cpu_usage_callback_.is_null() ? process_data->metrics()->GetCPUUsage() 215 cpu_usage_callback_.is_null() ? process_data->metrics()->GetCPUUsage()
215 : cpu_usage_callback_.Run(handle))); 216 : cpu_usage_callback_.Run(handle)));
216 process_data->set_seen_this_cycle(true); 217 process_data->set_seen_this_cycle(true);
217 } 218 }
OLDNEW
« no previous file with comments | « chrome/browser/power/process_power_collector.h ('k') | chrome/browser/power/process_power_collector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698