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

Side by Side Diff: ios/chrome/browser/ios_chrome_io_thread.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/ios_chrome_io_thread.h" 5 #include "ios/chrome/browser/ios_chrome_io_thread.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 context->set_http_auth_handler_factory( 534 context->set_http_auth_handler_factory(
535 globals->http_auth_handler_factory.get()); 535 globals->http_auth_handler_factory.get());
536 context->set_proxy_service(globals->system_proxy_service.get()); 536 context->set_proxy_service(globals->system_proxy_service.get());
537 context->set_ct_policy_enforcer(globals->ct_policy_enforcer.get()); 537 context->set_ct_policy_enforcer(globals->ct_policy_enforcer.get());
538 538
539 net::URLRequestJobFactoryImpl* system_job_factory = 539 net::URLRequestJobFactoryImpl* system_job_factory =
540 new net::URLRequestJobFactoryImpl(); 540 new net::URLRequestJobFactoryImpl();
541 // Data URLs are always loaded through the system request context on iOS 541 // Data URLs are always loaded through the system request context on iOS
542 // (due to UIWebView limitations). 542 // (due to UIWebView limitations).
543 bool set_protocol = system_job_factory->SetProtocolHandler( 543 bool set_protocol = system_job_factory->SetProtocolHandler(
544 url::kDataScheme, base::WrapUnique(new net::DataProtocolHandler())); 544 url::kDataScheme, base::MakeUnique<net::DataProtocolHandler>());
545 DCHECK(set_protocol); 545 DCHECK(set_protocol);
546 globals->system_url_request_job_factory.reset(system_job_factory); 546 globals->system_url_request_job_factory.reset(system_job_factory);
547 context->set_job_factory(globals->system_url_request_job_factory.get()); 547 context->set_job_factory(globals->system_url_request_job_factory.get());
548 548
549 context->set_cookie_store(globals->system_cookie_store.get()); 549 context->set_cookie_store(globals->system_cookie_store.get());
550 context->set_channel_id_service(globals->system_channel_id_service.get()); 550 context->set_channel_id_service(globals->system_channel_id_service.get());
551 context->set_network_delegate(globals->system_network_delegate.get()); 551 context->set_network_delegate(globals->system_network_delegate.get());
552 context->set_http_user_agent_settings( 552 context->set_http_user_agent_settings(
553 globals->http_user_agent_settings.get()); 553 globals->http_user_agent_settings.get());
554 context->set_network_quality_estimator( 554 context->set_network_quality_estimator(
555 globals->network_quality_estimator.get()); 555 globals->network_quality_estimator.get());
556 556
557 context->set_http_server_properties(globals->http_server_properties.get()); 557 context->set_http_server_properties(globals->http_server_properties.get());
558 558
559 net::HttpNetworkSession::Params system_params(params); 559 net::HttpNetworkSession::Params system_params(params);
560 net::URLRequestContextBuilder::SetHttpNetworkSessionComponents( 560 net::URLRequestContextBuilder::SetHttpNetworkSessionComponents(
561 context, &system_params); 561 context, &system_params);
562 562
563 globals->system_http_network_session.reset( 563 globals->system_http_network_session.reset(
564 new net::HttpNetworkSession(system_params)); 564 new net::HttpNetworkSession(system_params));
565 globals->system_http_transaction_factory.reset( 565 globals->system_http_transaction_factory.reset(
566 new net::HttpNetworkLayer(globals->system_http_network_session.get())); 566 new net::HttpNetworkLayer(globals->system_http_network_session.get()));
567 context->set_http_transaction_factory( 567 context->set_http_transaction_factory(
568 globals->system_http_transaction_factory.get()); 568 globals->system_http_transaction_factory.get());
569 569
570 return context; 570 return context;
571 } 571 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698