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

Side by Side Diff: ios/chrome/browser/browser_state/chrome_browser_state_impl.cc

Issue 1861593005: Convert //ios from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase? Created 4 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser_state/chrome_browser_state_impl.h" 5 #include "ios/chrome/browser/browser_state/chrome_browser_state_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 192
193 bool ChromeBrowserStateImpl::IsOffTheRecord() const { 193 bool ChromeBrowserStateImpl::IsOffTheRecord() const {
194 return false; 194 return false;
195 } 195 }
196 196
197 base::FilePath ChromeBrowserStateImpl::GetStatePath() const { 197 base::FilePath ChromeBrowserStateImpl::GetStatePath() const {
198 return state_path_; 198 return state_path_;
199 } 199 }
200 200
201 void ChromeBrowserStateImpl::SetOffTheRecordChromeBrowserState( 201 void ChromeBrowserStateImpl::SetOffTheRecordChromeBrowserState(
202 scoped_ptr<ios::ChromeBrowserState> otr_state) { 202 std::unique_ptr<ios::ChromeBrowserState> otr_state) {
203 DCHECK(!otr_state_); 203 DCHECK(!otr_state_);
204 otr_state_ = std::move(otr_state); 204 otr_state_ = std::move(otr_state);
205 } 205 }
206 206
207 PrefService* ChromeBrowserStateImpl::GetOffTheRecordPrefs() { 207 PrefService* ChromeBrowserStateImpl::GetOffTheRecordPrefs() {
208 DCHECK(prefs_); 208 DCHECK(prefs_);
209 if (!otr_prefs_) { 209 if (!otr_prefs_) {
210 otr_prefs_ = CreateIncognitoBrowserStatePrefs(prefs_.get()); 210 otr_prefs_ = CreateIncognitoBrowserStatePrefs(prefs_.get());
211 } 211 }
212 return otr_prefs_.get(); 212 return otr_prefs_.get();
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 net::SSLConfigService* ChromeBrowserStateImpl::GetSSLConfigService() { 251 net::SSLConfigService* ChromeBrowserStateImpl::GetSSLConfigService() {
252 // If ssl_config_service_manager_ is null, this typically means that some 252 // If ssl_config_service_manager_ is null, this typically means that some
253 // KeyedService is trying to create a RequestContext at startup, 253 // KeyedService is trying to create a RequestContext at startup,
254 // but SSLConfigServiceManager is not initialized until DoFinalInit() which is 254 // but SSLConfigServiceManager is not initialized until DoFinalInit() which is
255 // invoked after all KeyedServices have been initialized (see 255 // invoked after all KeyedServices have been initialized (see
256 // http://crbug.com/171406). 256 // http://crbug.com/171406).
257 DCHECK(ssl_config_service_manager_) 257 DCHECK(ssl_config_service_manager_)
258 << "SSLConfigServiceManager is not initialized yet"; 258 << "SSLConfigServiceManager is not initialized yet";
259 return ssl_config_service_manager_->Get(); 259 return ssl_config_service_manager_->Get();
260 } 260 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698