| 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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 | 378 |
| 379 ChromeURLRequestContext* | 379 ChromeURLRequestContext* |
| 380 ProfileIOData::GetExtensionsRequestContext() const { | 380 ProfileIOData::GetExtensionsRequestContext() const { |
| 381 LazyInitialize(); | 381 LazyInitialize(); |
| 382 return extensions_request_context_.get(); | 382 return extensions_request_context_.get(); |
| 383 } | 383 } |
| 384 | 384 |
| 385 ChromeURLRequestContext* | 385 ChromeURLRequestContext* |
| 386 ProfileIOData::GetIsolatedAppRequestContext( | 386 ProfileIOData::GetIsolatedAppRequestContext( |
| 387 ChromeURLRequestContext* main_context, | 387 ChromeURLRequestContext* main_context, |
| 388 const std::string& app_id, | 388 const StoragePartitionDetails& partition_details, |
| 389 scoped_ptr<net::URLRequestJobFactory::Interceptor> | 389 scoped_ptr<net::URLRequestJobFactory::Interceptor> |
| 390 protocol_handler_interceptor) const { | 390 protocol_handler_interceptor) const { |
| 391 LazyInitialize(); | 391 LazyInitialize(); |
| 392 ChromeURLRequestContext* context = NULL; | 392 ChromeURLRequestContext* context = NULL; |
| 393 if (ContainsKey(app_request_context_map_, app_id)) { | 393 if (ContainsKey(app_request_context_map_, partition_details)) { |
| 394 context = app_request_context_map_[app_id]; | 394 context = app_request_context_map_[partition_details]; |
| 395 } else { | 395 } else { |
| 396 context = AcquireIsolatedAppRequestContext( | 396 context = AcquireIsolatedAppRequestContext( |
| 397 main_context, app_id, protocol_handler_interceptor.Pass()); | 397 main_context, partition_details, protocol_handler_interceptor.Pass()); |
| 398 app_request_context_map_[app_id] = context; | 398 app_request_context_map_[partition_details] = context; |
| 399 } | 399 } |
| 400 DCHECK(context); | 400 DCHECK(context); |
| 401 return context; | 401 return context; |
| 402 } | 402 } |
| 403 | 403 |
| 404 ChromeURLRequestContext* | 404 ChromeURLRequestContext* |
| 405 ProfileIOData::GetIsolatedMediaRequestContext( | 405 ProfileIOData::GetIsolatedMediaRequestContext( |
| 406 ChromeURLRequestContext* app_context, | 406 ChromeURLRequestContext* app_context, |
| 407 const std::string& app_id) const { | 407 const StoragePartitionDetails& partition_details) const { |
| 408 LazyInitialize(); | 408 LazyInitialize(); |
| 409 ChromeURLRequestContext* context = NULL; | 409 ChromeURLRequestContext* context = NULL; |
| 410 if (ContainsKey(isolated_media_request_context_map_, app_id)) { | 410 if (ContainsKey(isolated_media_request_context_map_, partition_details)) { |
| 411 context = isolated_media_request_context_map_[app_id]; | 411 context = isolated_media_request_context_map_[partition_details]; |
| 412 } else { | 412 } else { |
| 413 context = AcquireIsolatedMediaRequestContext(app_context, app_id); | 413 context = AcquireIsolatedMediaRequestContext(app_context, |
| 414 isolated_media_request_context_map_[app_id] = context; | 414 partition_details); |
| 415 isolated_media_request_context_map_[partition_details] = context; |
| 415 } | 416 } |
| 416 DCHECK(context); | 417 DCHECK(context); |
| 417 return context; | 418 return context; |
| 418 } | 419 } |
| 419 | 420 |
| 420 ExtensionInfoMap* ProfileIOData::GetExtensionInfoMap() const { | 421 ExtensionInfoMap* ProfileIOData::GetExtensionInfoMap() const { |
| 421 DCHECK(extension_info_map_) << "ExtensionSystem not initialized"; | 422 DCHECK(extension_info_map_) << "ExtensionSystem not initialized"; |
| 422 return extension_info_map_; | 423 return extension_info_map_; |
| 423 } | 424 } |
| 424 | 425 |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 params->http_pipelining_enabled = globals->http_pipelining_enabled; | 718 params->http_pipelining_enabled = globals->http_pipelining_enabled; |
| 718 params->testing_fixed_http_port = globals->testing_fixed_http_port; | 719 params->testing_fixed_http_port = globals->testing_fixed_http_port; |
| 719 params->testing_fixed_https_port = globals->testing_fixed_https_port; | 720 params->testing_fixed_https_port = globals->testing_fixed_https_port; |
| 720 | 721 |
| 721 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 722 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 722 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) { | 723 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) { |
| 723 params->trusted_spdy_proxy = command_line.GetSwitchValueASCII( | 724 params->trusted_spdy_proxy = command_line.GetSwitchValueASCII( |
| 724 switches::kTrustedSpdyProxy); | 725 switches::kTrustedSpdyProxy); |
| 725 } | 726 } |
| 726 } | 727 } |
| OLD | NEW |