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

Side by Side Diff: chrome/browser/browser_process_impl.cc

Issue 2133083002: Remove all remaining traces of MessageLoopProxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 "chrome/browser/browser_process_impl.h" 5 #include "chrome/browser/browser_process_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 base::SequencedWorkerPool* worker_pool = 1174 base::SequencedWorkerPool* worker_pool =
1175 content::BrowserThread::GetBlockingPool(); 1175 content::BrowserThread::GetBlockingPool();
1176 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner( 1176 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner(
1177 worker_pool->GetSequencedTaskRunnerWithShutdownBehavior( 1177 worker_pool->GetSequencedTaskRunnerWithShutdownBehavior(
1178 worker_pool->GetSequenceToken(), 1178 worker_pool->GetSequenceToken(),
1179 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); 1179 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN));
1180 1180
1181 gcm_driver_ = gcm::CreateGCMDriverDesktop( 1181 gcm_driver_ = gcm::CreateGCMDriverDesktop(
1182 base::WrapUnique(new gcm::GCMClientFactory), local_state(), store_path, 1182 base::WrapUnique(new gcm::GCMClientFactory), local_state(), store_path,
1183 system_request_context(), chrome::GetChannel(), 1183 system_request_context(), chrome::GetChannel(),
1184 content::BrowserThread::GetMessageLoopProxyForThread( 1184 content::BrowserThread::GetTaskRunnerForThread(
1185 content::BrowserThread::UI), 1185 content::BrowserThread::UI),
1186 content::BrowserThread::GetMessageLoopProxyForThread( 1186 content::BrowserThread::GetTaskRunnerForThread(
1187 content::BrowserThread::IO), 1187 content::BrowserThread::IO),
1188 blocking_task_runner); 1188 blocking_task_runner);
1189 #endif // defined(OS_ANDROID) 1189 #endif // defined(OS_ANDROID)
1190 } 1190 }
1191 1191
1192 void BrowserProcessImpl::ApplyDefaultBrowserPolicy() { 1192 void BrowserProcessImpl::ApplyDefaultBrowserPolicy() {
1193 if (local_state()->GetBoolean(prefs::kDefaultBrowserSettingEnabled)) { 1193 if (local_state()->GetBoolean(prefs::kDefaultBrowserSettingEnabled)) {
1194 // The worker pointer is reference counted. While it is running, the 1194 // The worker pointer is reference counted. While it is running, the
1195 // message loops of the FILE and UI thread will hold references to it 1195 // message loops of the FILE and UI thread will hold references to it
1196 // and it will be automatically freed once all its tasks have finished. 1196 // and it will be automatically freed once all its tasks have finished.
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1331 } 1331 }
1332 1332
1333 void BrowserProcessImpl::OnAutoupdateTimer() { 1333 void BrowserProcessImpl::OnAutoupdateTimer() {
1334 if (CanAutorestartForUpdate()) { 1334 if (CanAutorestartForUpdate()) {
1335 DLOG(WARNING) << "Detected update. Restarting browser."; 1335 DLOG(WARNING) << "Detected update. Restarting browser.";
1336 RestartBackgroundInstance(); 1336 RestartBackgroundInstance();
1337 } 1337 }
1338 } 1338 }
1339 1339
1340 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1340 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698