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

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

Issue 2536723009: Make net::URLRequestContext a MemoryDumpProvider (Closed)
Patch Set: fix compile Created 4 years 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 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 incognito_availibility_pref_.Init( 547 incognito_availibility_pref_.Init(
548 prefs::kIncognitoModeAvailability, pref_service); 548 prefs::kIncognitoModeAvailability, pref_service);
549 incognito_availibility_pref_.MoveToThread(io_task_runner); 549 incognito_availibility_pref_.MoveToThread(io_task_runner);
550 550
551 // We need to make sure that content initializes its own data structures that 551 // We need to make sure that content initializes its own data structures that
552 // are associated with each ResourceContext because we might post this 552 // are associated with each ResourceContext because we might post this
553 // object to the IO thread after this function. 553 // object to the IO thread after this function.
554 BrowserContext::EnsureResourceContextInitialized(profile); 554 BrowserContext::EnsureResourceContextInitialized(profile);
555 } 555 }
556 556
557 ProfileIOData::MediaRequestContext::MediaRequestContext() { 557 ProfileIOData::MediaRequestContext::MediaRequestContext(
558 const std::string& name) {
559 set_name(name);
558 } 560 }
559 561
560 void ProfileIOData::MediaRequestContext::SetHttpTransactionFactory( 562 void ProfileIOData::MediaRequestContext::SetHttpTransactionFactory(
561 std::unique_ptr<net::HttpTransactionFactory> http_factory) { 563 std::unique_ptr<net::HttpTransactionFactory> http_factory) {
562 http_factory_ = std::move(http_factory); 564 http_factory_ = std::move(http_factory);
563 set_http_transaction_factory(http_factory_.get()); 565 set_http_transaction_factory(http_factory_.get());
564 } 566 }
565 567
566 ProfileIOData::MediaRequestContext::~MediaRequestContext() { 568 ProfileIOData::MediaRequestContext::~MediaRequestContext() {
567 AssertNoURLRequests(); 569 AssertNoURLRequests();
568 } 570 }
569 571
570 ProfileIOData::AppRequestContext::AppRequestContext() { 572 ProfileIOData::AppRequestContext::AppRequestContext() {
573 set_name("app_request");
571 } 574 }
572 575
573 void ProfileIOData::AppRequestContext::SetCookieStore( 576 void ProfileIOData::AppRequestContext::SetCookieStore(
574 std::unique_ptr<net::CookieStore> cookie_store) { 577 std::unique_ptr<net::CookieStore> cookie_store) {
575 cookie_store_ = std::move(cookie_store); 578 cookie_store_ = std::move(cookie_store);
576 set_cookie_store(cookie_store_.get()); 579 set_cookie_store(cookie_store_.get());
577 } 580 }
578 581
579 void ProfileIOData::AppRequestContext::SetChannelIDService( 582 void ProfileIOData::AppRequestContext::SetChannelIDService(
580 std::unique_ptr<net::ChannelIDService> channel_id_service) { 583 std::unique_ptr<net::ChannelIDService> channel_id_service) {
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 IOThread* const io_thread = profile_params_->io_thread; 1018 IOThread* const io_thread = profile_params_->io_thread;
1016 IOThread::Globals* const io_thread_globals = io_thread->globals(); 1019 IOThread::Globals* const io_thread_globals = io_thread->globals();
1017 const base::CommandLine& command_line = 1020 const base::CommandLine& command_line =
1018 *base::CommandLine::ForCurrentProcess(); 1021 *base::CommandLine::ForCurrentProcess();
1019 1022
1020 // Create the common request contexts. 1023 // Create the common request contexts.
1021 main_request_context_.reset(new net::URLRequestContext()); 1024 main_request_context_.reset(new net::URLRequestContext());
1022 main_request_context_storage_.reset( 1025 main_request_context_storage_.reset(
1023 new net::URLRequestContextStorage(main_request_context_.get())); 1026 new net::URLRequestContextStorage(main_request_context_.get()));
1024 extensions_request_context_.reset(new net::URLRequestContext()); 1027 extensions_request_context_.reset(new net::URLRequestContext());
1028 main_request_context_->set_name("main");
1029 extensions_request_context_->set_name("extensions");
1025 1030
1026 main_request_context_->set_enable_brotli(io_thread_globals->enable_brotli); 1031 main_request_context_->set_enable_brotli(io_thread_globals->enable_brotli);
1027 1032
1028 std::unique_ptr<ChromeNetworkDelegate> network_delegate( 1033 std::unique_ptr<ChromeNetworkDelegate> network_delegate(
1029 new ChromeNetworkDelegate( 1034 new ChromeNetworkDelegate(
1030 #if BUILDFLAG(ENABLE_EXTENSIONS) 1035 #if BUILDFLAG(ENABLE_EXTENSIONS)
1031 io_thread_globals->extension_event_router_forwarder.get(), 1036 io_thread_globals->extension_event_router_forwarder.get(),
1032 #else 1037 #else
1033 NULL, 1038 NULL,
1034 #endif 1039 #endif
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1354 void ProfileIOData::SetCookieSettingsForTesting( 1359 void ProfileIOData::SetCookieSettingsForTesting(
1355 content_settings::CookieSettings* cookie_settings) { 1360 content_settings::CookieSettings* cookie_settings) {
1356 DCHECK(!cookie_settings_.get()); 1361 DCHECK(!cookie_settings_.get());
1357 cookie_settings_ = cookie_settings; 1362 cookie_settings_ = cookie_settings;
1358 } 1363 }
1359 1364
1360 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( 1365 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState(
1361 const GURL& url) const { 1366 const GURL& url) const {
1362 return url_blacklist_manager_->GetURLBlacklistState(url); 1367 return url_blacklist_manager_->GetURLBlacklistState(url);
1363 } 1368 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | chrome/browser/safe_browsing/safe_browsing_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698