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

Side by Side Diff: chrome/browser/profiles/profile_io_data.cc

Issue 2414883005: TEMP DO NOT LAND (Closed)
Patch Set: temp Created 4 years, 2 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/browser/profiles/profile_io_data.h" 5 #include "chrome/browser/profiles/profile_io_data.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 // object to the IO thread after this function. 555 // object to the IO thread after this function.
556 BrowserContext::EnsureResourceContextInitialized(profile); 556 BrowserContext::EnsureResourceContextInitialized(profile);
557 } 557 }
558 558
559 ProfileIOData::MediaRequestContext::MediaRequestContext() { 559 ProfileIOData::MediaRequestContext::MediaRequestContext() {
560 } 560 }
561 561
562 void ProfileIOData::MediaRequestContext::SetHttpTransactionFactory( 562 void ProfileIOData::MediaRequestContext::SetHttpTransactionFactory(
563 std::unique_ptr<net::HttpTransactionFactory> http_factory) { 563 std::unique_ptr<net::HttpTransactionFactory> http_factory) {
564 http_factory_ = std::move(http_factory); 564 http_factory_ = std::move(http_factory);
565 set_name_string("media");
565 set_http_transaction_factory(http_factory_.get()); 566 set_http_transaction_factory(http_factory_.get());
566 } 567 }
567 568
568 ProfileIOData::MediaRequestContext::~MediaRequestContext() { 569 ProfileIOData::MediaRequestContext::~MediaRequestContext() {
569 AssertNoURLRequests(); 570 AssertNoURLRequests();
570 } 571 }
571 572
572 ProfileIOData::AppRequestContext::AppRequestContext() { 573 ProfileIOData::AppRequestContext::AppRequestContext() {
573 } 574 }
574 575
(...skipping 10 matching lines...) Expand all
585 } 586 }
586 587
587 void ProfileIOData::AppRequestContext::SetHttpNetworkSession( 588 void ProfileIOData::AppRequestContext::SetHttpNetworkSession(
588 std::unique_ptr<net::HttpNetworkSession> http_network_session) { 589 std::unique_ptr<net::HttpNetworkSession> http_network_session) {
589 http_network_session_ = std::move(http_network_session); 590 http_network_session_ = std::move(http_network_session);
590 } 591 }
591 592
592 void ProfileIOData::AppRequestContext::SetHttpTransactionFactory( 593 void ProfileIOData::AppRequestContext::SetHttpTransactionFactory(
593 std::unique_ptr<net::HttpTransactionFactory> http_factory) { 594 std::unique_ptr<net::HttpTransactionFactory> http_factory) {
594 http_factory_ = std::move(http_factory); 595 http_factory_ = std::move(http_factory);
596 set_name_string("app_request");
595 set_http_transaction_factory(http_factory_.get()); 597 set_http_transaction_factory(http_factory_.get());
596 } 598 }
597 599
598 void ProfileIOData::AppRequestContext::SetJobFactory( 600 void ProfileIOData::AppRequestContext::SetJobFactory(
599 std::unique_ptr<net::URLRequestJobFactory> job_factory) { 601 std::unique_ptr<net::URLRequestJobFactory> job_factory) {
600 job_factory_ = std::move(job_factory); 602 job_factory_ = std::move(job_factory);
601 set_job_factory(job_factory_.get()); 603 set_job_factory(job_factory_.get());
602 } 604 }
603 605
604 ProfileIOData::AppRequestContext::~AppRequestContext() { 606 ProfileIOData::AppRequestContext::~AppRequestContext() {
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 DCHECK(profile_params_.get()); 1023 DCHECK(profile_params_.get());
1022 1024
1023 IOThread* const io_thread = profile_params_->io_thread; 1025 IOThread* const io_thread = profile_params_->io_thread;
1024 IOThread::Globals* const io_thread_globals = io_thread->globals(); 1026 IOThread::Globals* const io_thread_globals = io_thread->globals();
1025 const base::CommandLine& command_line = 1027 const base::CommandLine& command_line =
1026 *base::CommandLine::ForCurrentProcess(); 1028 *base::CommandLine::ForCurrentProcess();
1027 1029
1028 // Create the common request contexts. 1030 // Create the common request contexts.
1029 main_request_context_.reset(new net::URLRequestContext()); 1031 main_request_context_.reset(new net::URLRequestContext());
1030 extensions_request_context_.reset(new net::URLRequestContext()); 1032 extensions_request_context_.reset(new net::URLRequestContext());
1033 main_request_context_->set_name_string("main");
1034 extensions_request_context_->set_name_string("extensions");
1031 1035
1032 main_request_context_->set_enable_brotli(io_thread_globals->enable_brotli); 1036 main_request_context_->set_enable_brotli(io_thread_globals->enable_brotli);
1033 1037
1034 std::unique_ptr<ChromeNetworkDelegate> network_delegate( 1038 std::unique_ptr<ChromeNetworkDelegate> network_delegate(
1035 new ChromeNetworkDelegate( 1039 new ChromeNetworkDelegate(
1036 #if defined(ENABLE_EXTENSIONS) 1040 #if defined(ENABLE_EXTENSIONS)
1037 io_thread_globals->extension_event_router_forwarder.get(), 1041 io_thread_globals->extension_event_router_forwarder.get(),
1038 #else 1042 #else
1039 NULL, 1043 NULL,
1040 #endif 1044 #endif
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
1366 void ProfileIOData::SetCookieSettingsForTesting( 1370 void ProfileIOData::SetCookieSettingsForTesting(
1367 content_settings::CookieSettings* cookie_settings) { 1371 content_settings::CookieSettings* cookie_settings) {
1368 DCHECK(!cookie_settings_.get()); 1372 DCHECK(!cookie_settings_.get());
1369 cookie_settings_ = cookie_settings; 1373 cookie_settings_ = cookie_settings;
1370 } 1374 }
1371 1375
1372 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( 1376 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState(
1373 const GURL& url) const { 1377 const GURL& url) const {
1374 return url_blacklist_manager_->GetURLBlacklistState(url); 1378 return url_blacklist_manager_->GetURLBlacklistState(url);
1375 } 1379 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698