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

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 1051863003: Turn ThreadPriority enum into an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@setthreadpri
Patch Set: nits Created 5 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 1029
1030 #if !defined(OS_IOS) 1030 #if !defined(OS_IOS)
1031 HistogramSynchronizer::GetInstance(); 1031 HistogramSynchronizer::GetInstance();
1032 1032
1033 1033
1034 // GpuDataManager for in-process initialized in PreCreateThreads. 1034 // GpuDataManager for in-process initialized in PreCreateThreads.
1035 bool initialize_gpu_data_manager = !UsingInProcessGpu(); 1035 bool initialize_gpu_data_manager = !UsingInProcessGpu();
1036 #if defined(OS_ANDROID) 1036 #if defined(OS_ANDROID)
1037 // Up the priority of anything that touches with display tasks 1037 // Up the priority of anything that touches with display tasks
1038 // (this thread is UI thread, and io_thread_ is for IPCs). 1038 // (this thread is UI thread, and io_thread_ is for IPCs).
1039 io_thread_->SetPriority(base::kThreadPriority_Display); 1039 io_thread_->SetPriority(base::ThreadPriority::DISPLAY);
1040 base::PlatformThread::SetThreadPriority( 1040 base::PlatformThread::SetThreadPriority(base::PlatformThread::CurrentHandle(),
1041 base::PlatformThread::CurrentHandle(), 1041 base::ThreadPriority::DISPLAY);
1042 base::kThreadPriority_Display);
1043 1042
1044 // On Android, GLSurface::InitializeOneOff() must be called before 1043 // On Android, GLSurface::InitializeOneOff() must be called before
1045 // initalizing the GpuDataManagerImpl as it uses the GL bindings. 1044 // initalizing the GpuDataManagerImpl as it uses the GL bindings.
1046 // TODO(sievers): Shouldn't need to init full bindings to determine GL 1045 // TODO(sievers): Shouldn't need to init full bindings to determine GL
1047 // version/vendor strings. crbug.com/326295 1046 // version/vendor strings. crbug.com/326295
1048 if (initialize_gpu_data_manager) { 1047 if (initialize_gpu_data_manager) {
1049 // Note InitializeOneOff is not safe either for in-process gpu after 1048 // Note InitializeOneOff is not safe either for in-process gpu after
1050 // creating threads, since it may race with the gpu thread. 1049 // creating threads, since it may race with the gpu thread.
1051 if (!gfx::GLSurface::InitializeOneOff()) { 1050 if (!gfx::GLSurface::InitializeOneOff()) {
1052 LOG(FATAL) << "GLSurface::InitializeOneOff failed"; 1051 LOG(FATAL) << "GLSurface::InitializeOneOff failed";
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 1277
1279 void BrowserMainLoop::EndStartupTracing() { 1278 void BrowserMainLoop::EndStartupTracing() {
1280 is_tracing_startup_ = false; 1279 is_tracing_startup_ = false;
1281 TracingController::GetInstance()->DisableRecording( 1280 TracingController::GetInstance()->DisableRecording(
1282 TracingController::CreateFileSink( 1281 TracingController::CreateFileSink(
1283 startup_trace_file_, 1282 startup_trace_file_,
1284 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); 1283 base::Bind(OnStoppedStartupTracing, startup_trace_file_)));
1285 } 1284 }
1286 1285
1287 } // namespace content 1286 } // namespace content
OLDNEW
« no previous file with comments | « base/threading/platform_thread_win.cc ('k') | content/browser/renderer_host/compositor_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698