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

Side by Side Diff: ios/chrome/browser/application_context_impl.cc

Issue 1556493002: Remove now obsolete Shutdown method of ChromeBrowserStateManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chrome_browser_provider
Patch Set: Rebase on https://codereview.chromium.org/1554683003 Created 4 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
« no previous file with comments | « no previous file | ios/public/provider/chrome/browser/browser_state/chrome_browser_state_manager.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ios/chrome/browser/application_context_impl.h" 5 #include "ios/chrome/browser/application_context_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // SafeBrowsing before the IO thread gets destroyed, since their destructors 126 // SafeBrowsing before the IO thread gets destroyed, since their destructors
127 // can call the URLFetcher destructor, which does a PostDelayedTask operation 127 // can call the URLFetcher destructor, which does a PostDelayedTask operation
128 // on the IO thread. (The IO thread will handle that URLFetcher operation 128 // on the IO thread. (The IO thread will handle that URLFetcher operation
129 // before going away.) 129 // before going away.)
130 if (safe_browsing_service_) 130 if (safe_browsing_service_)
131 safe_browsing_service_->ShutDown(); 131 safe_browsing_service_->ShutDown();
132 132
133 metrics_services_manager_.reset(); 133 metrics_services_manager_.reset();
134 134
135 // Need to clear browser states before the IO thread. 135 // Need to clear browser states before the IO thread.
136 if (chrome_browser_state_manager_) { 136 chrome_browser_state_manager_.reset();
137 // TODO(crbug.com/560854): the ShutDown() method can be folded into the
138 // destructor once ApplicationContextImpl owns ChromeBrowserStateManager.
139 chrome_browser_state_manager_->ShutDown();
140 chrome_browser_state_manager_.reset();
141 }
142 137
143 // PromoResourceService must be destroyed after the keyed services and before 138 // PromoResourceService must be destroyed after the keyed services and before
144 // the IO thread. 139 // the IO thread.
145 promo_resource_service_.reset(); 140 promo_resource_service_.reset();
146 141
147 // The GCMDriver must shut down while the IO thread is still alive. 142 // The GCMDriver must shut down while the IO thread is still alive.
148 if (gcm_driver_) 143 if (gcm_driver_)
149 gcm_driver_->Shutdown(); 144 gcm_driver_->Shutdown();
150 145
151 if (local_state_) { 146 if (local_state_) {
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 worker_pool->GetSequenceToken(), 385 worker_pool->GetSequenceToken(),
391 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); 386 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN));
392 387
393 gcm_driver_ = gcm::CreateGCMDriverDesktop( 388 gcm_driver_ = gcm::CreateGCMDriverDesktop(
394 make_scoped_ptr(new gcm::GCMClientFactory), GetLocalState(), store_path, 389 make_scoped_ptr(new gcm::GCMClientFactory), GetLocalState(), store_path,
395 GetSystemURLRequestContext(), ::GetChannel(), 390 GetSystemURLRequestContext(), ::GetChannel(),
396 web::WebThread::GetTaskRunnerForThread(web::WebThread::UI), 391 web::WebThread::GetTaskRunnerForThread(web::WebThread::UI),
397 web::WebThread::GetTaskRunnerForThread(web::WebThread::IO), 392 web::WebThread::GetTaskRunnerForThread(web::WebThread::IO),
398 blocking_task_runner); 393 blocking_task_runner);
399 } 394 }
OLDNEW
« no previous file with comments | « no previous file | ios/public/provider/chrome/browser/browser_state/chrome_browser_state_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698