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

Side by Side Diff: content/renderer/devtools/devtools_cpu_throttler.cc

Issue 1547073003: Switch to standard integer types in content/renderer/. (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 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 "content/renderer/devtools/devtools_cpu_throttler.h" 5 #include "content/renderer/devtools/devtools_cpu_throttler.h"
6 6
7 #if defined(OS_POSIX) 7 #if defined(OS_POSIX)
8 #include <signal.h> 8 #include <signal.h>
9 #define USE_SIGNALS 9 #define USE_SIGNALS
10 #endif 10 #endif
11 11
12 #include "base/atomicops.h" 12 #include "base/atomicops.h"
13 #include "base/macros.h"
13 #include "base/synchronization/cancellation_flag.h" 14 #include "base/synchronization/cancellation_flag.h"
14 #include "base/threading/platform_thread.h" 15 #include "base/threading/platform_thread.h"
16 #include "build/build_config.h"
15 17
16 using base::subtle::Atomic32; 18 using base::subtle::Atomic32;
17 using base::subtle::Acquire_Load; 19 using base::subtle::Acquire_Load;
18 using base::subtle::Release_Store; 20 using base::subtle::Release_Store;
19 21
20 namespace content { 22 namespace content {
21 23
22 class CPUThrottlingThread final : public base::PlatformThread::Delegate { 24 class CPUThrottlingThread final : public base::PlatformThread::Delegate {
23 public: 25 public:
24 explicit CPUThrottlingThread(double rate); 26 explicit CPUThrottlingThread(double rate);
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 return; 178 return;
177 } 179 }
178 if (throttling_thread_) { 180 if (throttling_thread_) {
179 throttling_thread_->SetThrottlingRate(rate); 181 throttling_thread_->SetThrottlingRate(rate);
180 } else { 182 } else {
181 throttling_thread_.reset(new CPUThrottlingThread(rate)); 183 throttling_thread_.reset(new CPUThrottlingThread(rate));
182 } 184 }
183 } 185 }
184 186
185 } // namespace content 187 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/devtools/devtools_cpu_throttler.h ('k') | content/renderer/devtools/lock_free_circular_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698