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

Side by Side Diff: ios/chrome/browser/browser_state/chrome_browser_state_impl_io_data.mm

Issue 2256193002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_io_data.h" 5 #include "ios/chrome/browser/browser_state/chrome_browser_state_impl_io_data.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 main_context->network_delegate()); 395 main_context->network_delegate());
396 main_context->set_job_factory(main_job_factory_.get()); 396 main_context->set_job_factory(main_job_factory_.get());
397 main_context->set_network_quality_estimator( 397 main_context->set_network_quality_estimator(
398 io_thread_globals->network_quality_estimator.get()); 398 io_thread_globals->network_quality_estimator.get());
399 399
400 // Setup SDCH for this profile. 400 // Setup SDCH for this profile.
401 sdch_manager_.reset(new net::SdchManager); 401 sdch_manager_.reset(new net::SdchManager);
402 sdch_policy_.reset(new net::SdchOwner(sdch_manager_.get(), main_context)); 402 sdch_policy_.reset(new net::SdchOwner(sdch_manager_.get(), main_context));
403 main_context->set_sdch_manager(sdch_manager_.get()); 403 main_context->set_sdch_manager(sdch_manager_.get());
404 sdch_policy_->EnablePersistentStorage( 404 sdch_policy_->EnablePersistentStorage(
405 base::WrapUnique(new SdchOwnerPrefStorage(network_json_store_.get()))); 405 base::MakeUnique<SdchOwnerPrefStorage>(network_json_store_.get()));
406 406
407 lazy_params_.reset(); 407 lazy_params_.reset();
408 } 408 }
409 409
410 ChromeBrowserStateIOData::AppRequestContext* 410 ChromeBrowserStateIOData::AppRequestContext*
411 ChromeBrowserStateImplIOData::InitializeAppRequestContext( 411 ChromeBrowserStateImplIOData::InitializeAppRequestContext(
412 net::URLRequestContext* main_context) const { 412 net::URLRequestContext* main_context) const {
413 // Copy most state from the main context. 413 // Copy most state from the main context.
414 AppRequestContext* context = new AppRequestContext(); 414 AppRequestContext* context = new AppRequestContext();
415 context->CopyFrom(main_context); 415 context->CopyFrom(main_context);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 const base::Closure& completion) { 475 const base::Closure& completion) {
476 DCHECK_CURRENTLY_ON(web::WebThread::IO); 476 DCHECK_CURRENTLY_ON(web::WebThread::IO);
477 DCHECK(initialized()); 477 DCHECK(initialized());
478 478
479 DCHECK(transport_security_state()); 479 DCHECK(transport_security_state());
480 // Completes synchronously. 480 // Completes synchronously.
481 transport_security_state()->DeleteAllDynamicDataSince(time); 481 transport_security_state()->DeleteAllDynamicDataSince(time);
482 DCHECK(http_server_properties_manager_); 482 DCHECK(http_server_properties_manager_);
483 http_server_properties_manager_->Clear(completion); 483 http_server_properties_manager_->Clear(completion);
484 } 484 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698