| OLD | NEW |
| 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 <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 BrowserContext::EnsureResourceContextInitialized(profile); | 231 BrowserContext::EnsureResourceContextInitialized(profile); |
| 232 } | 232 } |
| 233 | 233 |
| 234 ProfileIOData::MediaRequestContext::MediaRequestContext( | 234 ProfileIOData::MediaRequestContext::MediaRequestContext( |
| 235 chrome_browser_net::LoadTimeStats* load_time_stats) | 235 chrome_browser_net::LoadTimeStats* load_time_stats) |
| 236 : ChromeURLRequestContext(ChromeURLRequestContext::CONTEXT_TYPE_MEDIA, | 236 : ChromeURLRequestContext(ChromeURLRequestContext::CONTEXT_TYPE_MEDIA, |
| 237 load_time_stats) { | 237 load_time_stats) { |
| 238 } | 238 } |
| 239 | 239 |
| 240 void ProfileIOData::MediaRequestContext::SetHttpTransactionFactory( | 240 void ProfileIOData::MediaRequestContext::SetHttpTransactionFactory( |
| 241 net::HttpTransactionFactory* http_factory) { | 241 scoped_ptr<net::HttpTransactionFactory> http_factory) { |
| 242 http_factory_.reset(http_factory); | 242 http_factory_ = http_factory.Pass(); |
| 243 set_http_transaction_factory(http_factory); | 243 set_http_transaction_factory(http_factory_.get()); |
| 244 } | 244 } |
| 245 | 245 |
| 246 ProfileIOData::MediaRequestContext::~MediaRequestContext() {} | 246 ProfileIOData::MediaRequestContext::~MediaRequestContext() {} |
| 247 | 247 |
| 248 ProfileIOData::AppRequestContext::AppRequestContext( | 248 ProfileIOData::AppRequestContext::AppRequestContext( |
| 249 chrome_browser_net::LoadTimeStats* load_time_stats) | 249 chrome_browser_net::LoadTimeStats* load_time_stats) |
| 250 : ChromeURLRequestContext(ChromeURLRequestContext::CONTEXT_TYPE_APP, | 250 : ChromeURLRequestContext(ChromeURLRequestContext::CONTEXT_TYPE_APP, |
| 251 load_time_stats) { | 251 load_time_stats) { |
| 252 } | 252 } |
| 253 | 253 |
| 254 void ProfileIOData::AppRequestContext::SetCookieStore( | 254 void ProfileIOData::AppRequestContext::SetCookieStore( |
| 255 net::CookieStore* cookie_store) { | 255 net::CookieStore* cookie_store) { |
| 256 cookie_store_ = cookie_store; | 256 cookie_store_ = cookie_store; |
| 257 set_cookie_store(cookie_store); | 257 set_cookie_store(cookie_store); |
| 258 } | 258 } |
| 259 | 259 |
| 260 void ProfileIOData::AppRequestContext::SetHttpTransactionFactory( | 260 void ProfileIOData::AppRequestContext::SetHttpTransactionFactory( |
| 261 net::HttpTransactionFactory* http_factory) { | 261 scoped_ptr<net::HttpTransactionFactory> http_factory) { |
| 262 http_factory_.reset(http_factory); | 262 http_factory_ = http_factory.Pass(); |
| 263 set_http_transaction_factory(http_factory); | 263 set_http_transaction_factory(http_factory.get()); |
| 264 } |
| 265 |
| 266 void ProfileIOData::AppRequestContext::SetJobFactory( |
| 267 scoped_ptr<net::URLRequestJobFactory> job_factory) { |
| 268 job_factory_ = job_factory.Pass(); |
| 269 set_job_factory(job_factory_.get()); |
| 264 } | 270 } |
| 265 | 271 |
| 266 ProfileIOData::AppRequestContext::~AppRequestContext() {} | 272 ProfileIOData::AppRequestContext::~AppRequestContext() {} |
| 267 | 273 |
| 268 ProfileIOData::ProfileParams::ProfileParams() | 274 ProfileIOData::ProfileParams::ProfileParams() |
| 269 : io_thread(NULL), | 275 : io_thread(NULL), |
| 270 #if defined(ENABLE_NOTIFICATIONS) | 276 #if defined(ENABLE_NOTIFICATIONS) |
| 271 notification_service(NULL), | 277 notification_service(NULL), |
| 272 #endif | 278 #endif |
| 273 profile(NULL) { | 279 profile(NULL) { |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 params->http_pipelining_enabled = globals->http_pipelining_enabled; | 692 params->http_pipelining_enabled = globals->http_pipelining_enabled; |
| 687 params->testing_fixed_http_port = globals->testing_fixed_http_port; | 693 params->testing_fixed_http_port = globals->testing_fixed_http_port; |
| 688 params->testing_fixed_https_port = globals->testing_fixed_https_port; | 694 params->testing_fixed_https_port = globals->testing_fixed_https_port; |
| 689 | 695 |
| 690 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 696 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 691 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) { | 697 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) { |
| 692 params->trusted_spdy_proxy = command_line.GetSwitchValueASCII( | 698 params->trusted_spdy_proxy = command_line.GetSwitchValueASCII( |
| 693 switches::kTrustedSpdyProxy); | 699 switches::kTrustedSpdyProxy); |
| 694 } | 700 } |
| 695 } | 701 } |
| OLD | NEW |