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

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: review #48 Created 5 years, 5 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
« no previous file with comments | « base/threading/platform_thread_win.cc ('k') | content/gpu/gpu_child_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 #if !defined(OS_IOS) 1101 #if !defined(OS_IOS)
1102 indexed_db_thread_.reset(new base::Thread("IndexedDB")); 1102 indexed_db_thread_.reset(new base::Thread("IndexedDB"));
1103 indexed_db_thread_->Start(); 1103 indexed_db_thread_->Start();
1104 #endif 1104 #endif
1105 1105
1106 #if !defined(OS_IOS) 1106 #if !defined(OS_IOS)
1107 HistogramSynchronizer::GetInstance(); 1107 HistogramSynchronizer::GetInstance();
1108 1108
1109 #if defined(OS_ANDROID) 1109 #if defined(OS_ANDROID)
1110 // Up the priority of the UI thread. 1110 // Up the priority of the UI thread.
1111 base::PlatformThread::SetThreadPriority(base::PlatformThread::CurrentHandle(), 1111 base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY);
1112 base::ThreadPriority::DISPLAY);
1113 #endif 1112 #endif
1114 1113
1115 bool always_uses_gpu = true; 1114 bool always_uses_gpu = true;
1116 bool established_gpu_channel = false; 1115 bool established_gpu_channel = false;
1117 #if defined(OS_ANDROID) 1116 #if defined(OS_ANDROID)
1118 // TODO(crbug.com/439322): This should be set to |true|. 1117 // TODO(crbug.com/439322): This should be set to |true|.
1119 established_gpu_channel = false; 1118 established_gpu_channel = false;
1120 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel); 1119 BrowserGpuChannelHostFactory::Initialize(established_gpu_channel);
1121 #elif defined(USE_AURA) || defined(OS_MACOSX) 1120 #elif defined(USE_AURA) || defined(OS_MACOSX)
1122 established_gpu_channel = true; 1121 established_gpu_channel = true;
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1346 DCHECK(is_tracing_startup_); 1345 DCHECK(is_tracing_startup_);
1347 1346
1348 is_tracing_startup_ = false; 1347 is_tracing_startup_ = false;
1349 TracingController::GetInstance()->DisableRecording( 1348 TracingController::GetInstance()->DisableRecording(
1350 TracingController::CreateFileSink( 1349 TracingController::CreateFileSink(
1351 startup_trace_file_, 1350 startup_trace_file_,
1352 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); 1351 base::Bind(OnStoppedStartupTracing, startup_trace_file_)));
1353 } 1352 }
1354 1353
1355 } // namespace content 1354 } // namespace content
OLDNEW
« no previous file with comments | « base/threading/platform_thread_win.cc ('k') | content/gpu/gpu_child_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698