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

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: 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 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 1037
1038 #if !defined(OS_IOS) 1038 #if !defined(OS_IOS)
1039 HistogramSynchronizer::GetInstance(); 1039 HistogramSynchronizer::GetInstance();
1040 1040
1041 1041
1042 // GpuDataManager for in-process initialized in PreCreateThreads. 1042 // GpuDataManager for in-process initialized in PreCreateThreads.
1043 bool initialize_gpu_data_manager = !UsingInProcessGpu(); 1043 bool initialize_gpu_data_manager = !UsingInProcessGpu();
1044 #if defined(OS_ANDROID) 1044 #if defined(OS_ANDROID)
1045 // Up the priority of anything that touches with display tasks 1045 // Up the priority of anything that touches with display tasks
1046 // (this thread is UI thread, and io_thread_ is for IPCs). 1046 // (this thread is UI thread, and io_thread_ is for IPCs).
1047 io_thread_->SetPriority(base::kThreadPriority_Display); 1047 io_thread_->SetPriority(base::ThreadPriority::DISPLAY);
1048 base::PlatformThread::SetThreadPriority( 1048 base::PlatformThread::SetThreadPriority(base::PlatformThread::CurrentHandle(),
1049 base::PlatformThread::CurrentHandle(), 1049 base::ThreadPriority::DISPLAY);
1050 base::kThreadPriority_Display);
1051 1050
1052 // On Android, GLSurface::InitializeOneOff() must be called before 1051 // On Android, GLSurface::InitializeOneOff() must be called before
1053 // initalizing the GpuDataManagerImpl as it uses the GL bindings. 1052 // initalizing the GpuDataManagerImpl as it uses the GL bindings.
1054 // TODO(sievers): Shouldn't need to init full bindings to determine GL 1053 // TODO(sievers): Shouldn't need to init full bindings to determine GL
1055 // version/vendor strings. crbug.com/326295 1054 // version/vendor strings. crbug.com/326295
1056 if (initialize_gpu_data_manager) { 1055 if (initialize_gpu_data_manager) {
1057 // Note InitializeOneOff is not safe either for in-process gpu after 1056 // Note InitializeOneOff is not safe either for in-process gpu after
1058 // creating threads, since it may race with the gpu thread. 1057 // creating threads, since it may race with the gpu thread.
1059 if (!gfx::GLSurface::InitializeOneOff()) { 1058 if (!gfx::GLSurface::InitializeOneOff()) {
1060 LOG(FATAL) << "GLSurface::InitializeOneOff failed"; 1059 LOG(FATAL) << "GLSurface::InitializeOneOff failed";
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 1273
1275 void BrowserMainLoop::EndStartupTracing() { 1274 void BrowserMainLoop::EndStartupTracing() {
1276 is_tracing_startup_ = false; 1275 is_tracing_startup_ = false;
1277 TracingController::GetInstance()->DisableRecording( 1276 TracingController::GetInstance()->DisableRecording(
1278 TracingController::CreateFileSink( 1277 TracingController::CreateFileSink(
1279 startup_trace_file_, 1278 startup_trace_file_,
1280 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); 1279 base::Bind(OnStoppedStartupTracing, startup_trace_file_)));
1281 } 1280 }
1282 1281
1283 } // namespace content 1282 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698