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

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

Issue 1193303002: base/threading: restrict to set only current thread priority (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: two more android fix and review #2 Created 5 years, 6 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/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 #if !defined(OS_IOS) 1096 #if !defined(OS_IOS)
1097 indexed_db_thread_.reset(new base::Thread("IndexedDB")); 1097 indexed_db_thread_.reset(new base::Thread("IndexedDB"));
1098 indexed_db_thread_->Start(); 1098 indexed_db_thread_->Start();
1099 #endif 1099 #endif
1100 1100
1101 #if !defined(OS_IOS) 1101 #if !defined(OS_IOS)
1102 HistogramSynchronizer::GetInstance(); 1102 HistogramSynchronizer::GetInstance();
1103 1103
1104 #if defined(OS_ANDROID) 1104 #if defined(OS_ANDROID)
1105 // Up the priority of the UI thread. 1105 // Up the priority of the UI thread.
1106 base::PlatformThread::SetThreadPriority(base::PlatformThread::CurrentHandle(), 1106 base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY);
1107 base::ThreadPriority::DISPLAY);
1108 #endif 1107 #endif
1109 1108
1110 if (!UsingInProcessGpu()) { 1109 if (!UsingInProcessGpu()) {
1111 GpuDataManagerImpl::GetInstance()->Initialize(); 1110 GpuDataManagerImpl::GetInstance()->Initialize();
1112 } 1111 }
1113 1112
1114 bool always_uses_gpu = true; 1113 bool always_uses_gpu = true;
1115 bool established_gpu_channel = false; 1114 bool established_gpu_channel = false;
1116 #if defined(OS_ANDROID) 1115 #if defined(OS_ANDROID)
1117 // TODO(crbug.com/439322): This should be set to |true|. 1116 // TODO(crbug.com/439322): This should be set to |true|.
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 DCHECK(is_tracing_startup_); 1344 DCHECK(is_tracing_startup_);
1346 1345
1347 is_tracing_startup_ = false; 1346 is_tracing_startup_ = false;
1348 TracingController::GetInstance()->DisableRecording( 1347 TracingController::GetInstance()->DisableRecording(
1349 TracingController::CreateFileSink( 1348 TracingController::CreateFileSink(
1350 startup_trace_file_, 1349 startup_trace_file_,
1351 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); 1350 base::Bind(OnStoppedStartupTracing, startup_trace_file_)));
1352 } 1351 }
1353 1352
1354 } // namespace content 1353 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698