summaryrefslogtreecommitdiffstats
path: root/content/renderer
diff options
context:
space:
mode:
authorgab <gab@chromium.org>2015-04-01 16:05:02 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-01 23:05:40 +0000
commit9a47073b992032eccd980693076a2dfb5dab429d (patch)
tree74458229f7a974865c750eceb7dbdc96efced359 /content/renderer
parented746db6b452ff281df0b227ea386e9a744acd9c (diff)
downloadchromium_src-9a47073b992032eccd980693076a2dfb5dab429d.zip
chromium_src-9a47073b992032eccd980693076a2dfb5dab429d.tar.gz
chromium_src-9a47073b992032eccd980693076a2dfb5dab429d.tar.bz2
Turn ThreadPriority enum into an enum class.
Adding some type safety as it is often used in close proximity with OS-level raw integer priorities. Also fixing nomenclature to use CHROMIUM_STYLE_ENUM_NAMES rather than kGoogleStyleEnumNames: https://www.chromium.org/developers/coding-style#Naming And lastly, sorting the declaration order by importance. TBR=jam BUG=456903 Review URL: https://codereview.chromium.org/1051863003 Cr-Commit-Position: refs/heads/master@{#323359}
Diffstat (limited to 'content/renderer')
-rw-r--r--content/renderer/gpu/compositor_output_surface.cc8
-rw-r--r--content/renderer/media/webrtc_local_audio_track_unittest.cc2
-rw-r--r--content/renderer/render_thread_impl.cc4
3 files changed, 7 insertions, 7 deletions
diff --git a/content/renderer/gpu/compositor_output_surface.cc b/content/renderer/gpu/compositor_output_surface.cc
index 0ce2973..bdeefe0 100644
--- a/content/renderer/gpu/compositor_output_surface.cc
+++ b/content/renderer/gpu/compositor_output_surface.cc
@@ -215,12 +215,12 @@ bool CompositorOutputSurface::Send(IPC::Message* message) {
namespace {
#if defined(OS_ANDROID)
void SetThreadPriorityToIdle(base::PlatformThreadHandle handle) {
- base::PlatformThread::SetThreadPriority(
- handle, base::kThreadPriority_Background);
+ base::PlatformThread::SetThreadPriority(handle,
+ base::ThreadPriority::BACKGROUND);
}
void SetThreadPriorityToDefault(base::PlatformThreadHandle handle) {
- base::PlatformThread::SetThreadPriority(
- handle, base::kThreadPriority_Normal);
+ base::PlatformThread::SetThreadPriority(handle,
+ base::ThreadPriority::NORMAL);
}
#else
void SetThreadPriorityToIdle(base::PlatformThreadHandle handle) {}
diff --git a/content/renderer/media/webrtc_local_audio_track_unittest.cc b/content/renderer/media/webrtc_local_audio_track_unittest.cc
index 5fdf43a..2300f4a5 100644
--- a/content/renderer/media/webrtc_local_audio_track_unittest.cc
+++ b/content/renderer/media/webrtc_local_audio_track_unittest.cc
@@ -66,7 +66,7 @@ class FakeAudioThread : public base::PlatformThread::Delegate {
void Start() {
base::PlatformThread::CreateWithPriority(
- 0, this, &thread_, base::kThreadPriority_RealtimeAudio);
+ 0, this, &thread_, base::ThreadPriority::REALTIME_AUDIO);
CHECK(!thread_.is_null());
}
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index ffbf609..3d713e0 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -671,7 +671,7 @@ void RenderThreadImpl::Init() {
#if defined(OS_ANDROID) || defined(OS_LINUX)
if (!command_line.HasSwitch(
switches::kUseNormalPriorityForTileTaskWorkerThreads)) {
- raster_thread->SetThreadPriority(base::kThreadPriority_Background);
+ raster_thread->SetThreadPriority(base::ThreadPriority::BACKGROUND);
}
#endif
compositor_raster_threads_.push_back(raster_thread.Pass());
@@ -1036,7 +1036,7 @@ void RenderThreadImpl::EnsureWebKitInitialized() {
compositor_thread_.reset(new base::Thread("Compositor"));
compositor_thread_->Start();
#if defined(OS_ANDROID)
- compositor_thread_->SetPriority(base::kThreadPriority_Display);
+ compositor_thread_->SetPriority(base::ThreadPriority::DISPLAY);
#endif
compositor_message_loop_proxy_ =
compositor_thread_->message_loop_proxy();