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

Side by Side Diff: chrome/service/service_process.cc

Issue 2620633004: Remove mojo::edk::test::ScopedIPCSupport (Closed)
Patch Set: . Created 3 years, 11 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/service/service_process.h" 5 #include "chrome/service/service_process.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/base_switches.h" 10 #include "base/base_switches.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 constexpr int kMaxTaskSchedulerThreads = 3; 164 constexpr int kMaxTaskSchedulerThreads = 3;
165 base::TaskScheduler::CreateAndSetSimpleTaskScheduler( 165 base::TaskScheduler::CreateAndSetSimpleTaskScheduler(
166 kMaxTaskSchedulerThreads); 166 kMaxTaskSchedulerThreads);
167 base::SequencedWorkerPool::EnableWithRedirectionToTaskSchedulerForProcess(); 167 base::SequencedWorkerPool::EnableWithRedirectionToTaskSchedulerForProcess();
168 168
169 blocking_pool_ = new base::SequencedWorkerPool( 169 blocking_pool_ = new base::SequencedWorkerPool(
170 3, "ServiceBlocking", base::TaskPriority::USER_VISIBLE); 170 3, "ServiceBlocking", base::TaskPriority::USER_VISIBLE);
171 171
172 // Initialize Mojo early so things can use it. 172 // Initialize Mojo early so things can use it.
173 mojo::edk::Init(); 173 mojo::edk::Init();
174 mojo_ipc_support_.reset( 174 mojo_ipc_support_.reset(new mojo::edk::ScopedIPCSupport(
175 new mojo::edk::ScopedIPCSupport(io_thread_->task_runner())); 175 io_thread_->task_runner(),
176 mojo::edk::ScopedIPCSupport::ShutdownPolicy::FAST));
176 177
177 request_context_getter_ = new ServiceURLRequestContextGetter(); 178 request_context_getter_ = new ServiceURLRequestContextGetter();
178 179
179 base::FilePath user_data_dir; 180 base::FilePath user_data_dir;
180 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); 181 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
181 base::FilePath pref_path = 182 base::FilePath pref_path =
182 user_data_dir.Append(chrome::kServiceStateFileName); 183 user_data_dir.Append(chrome::kServiceStateFileName);
183 service_prefs_.reset(new ServiceProcessPrefs( 184 service_prefs_.reset(new ServiceProcessPrefs(
184 pref_path, 185 pref_path,
185 JsonPrefStore::GetTaskRunnerForFile(pref_path, blocking_pool_.get()) 186 JsonPrefStore::GetTaskRunnerForFile(pref_path, blocking_pool_.get())
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 } else { 425 } else {
425 Shutdown(); 426 Shutdown();
426 } 427 }
427 } 428 }
428 } 429 }
429 430
430 ServiceProcess::~ServiceProcess() { 431 ServiceProcess::~ServiceProcess() {
431 Teardown(); 432 Teardown();
432 g_service_process = NULL; 433 g_service_process = NULL;
433 } 434 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698