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

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

Issue 11147026: Initial refactor to get profiles to propagate storage partition details. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Missed a merging of removed variable. Created 8 years, 1 month 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 | Annotate | Revision Log
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 <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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 366
367 ChromeURLRequestContext* 367 ChromeURLRequestContext*
368 ProfileIOData::GetExtensionsRequestContext() const { 368 ProfileIOData::GetExtensionsRequestContext() const {
369 LazyInitialize(); 369 LazyInitialize();
370 return extensions_request_context_.get(); 370 return extensions_request_context_.get();
371 } 371 }
372 372
373 ChromeURLRequestContext* 373 ChromeURLRequestContext*
374 ProfileIOData::GetIsolatedAppRequestContext( 374 ProfileIOData::GetIsolatedAppRequestContext(
375 ChromeURLRequestContext* main_context, 375 ChromeURLRequestContext* main_context,
376 const std::string& app_id, 376 const StoragePartitionDescriptor& partition_descriptor,
377 scoped_ptr<net::URLRequestJobFactory::Interceptor> 377 scoped_ptr<net::URLRequestJobFactory::Interceptor>
378 protocol_handler_interceptor) const { 378 protocol_handler_interceptor) const {
379 LazyInitialize(); 379 LazyInitialize();
380 ChromeURLRequestContext* context = NULL; 380 ChromeURLRequestContext* context = NULL;
381 if (ContainsKey(app_request_context_map_, app_id)) { 381 if (ContainsKey(app_request_context_map_, partition_descriptor)) {
382 context = app_request_context_map_[app_id]; 382 context = app_request_context_map_[partition_descriptor];
383 } else { 383 } else {
384 context = AcquireIsolatedAppRequestContext( 384 context = AcquireIsolatedAppRequestContext(
385 main_context, app_id, protocol_handler_interceptor.Pass()); 385 main_context, partition_descriptor,
386 app_request_context_map_[app_id] = context; 386 protocol_handler_interceptor.Pass());
387 app_request_context_map_[partition_descriptor] = context;
387 } 388 }
388 DCHECK(context); 389 DCHECK(context);
389 return context; 390 return context;
390 } 391 }
391 392
392 ChromeURLRequestContext* 393 ChromeURLRequestContext*
393 ProfileIOData::GetIsolatedMediaRequestContext( 394 ProfileIOData::GetIsolatedMediaRequestContext(
394 ChromeURLRequestContext* app_context, 395 ChromeURLRequestContext* app_context,
395 const std::string& app_id) const { 396 const StoragePartitionDescriptor& partition_descriptor) const {
396 LazyInitialize(); 397 LazyInitialize();
397 ChromeURLRequestContext* context = NULL; 398 ChromeURLRequestContext* context = NULL;
398 if (ContainsKey(isolated_media_request_context_map_, app_id)) { 399 if (ContainsKey(isolated_media_request_context_map_, partition_descriptor)) {
399 context = isolated_media_request_context_map_[app_id]; 400 context = isolated_media_request_context_map_[partition_descriptor];
400 } else { 401 } else {
401 context = AcquireIsolatedMediaRequestContext(app_context, app_id); 402 context = AcquireIsolatedMediaRequestContext(app_context,
402 isolated_media_request_context_map_[app_id] = context; 403 partition_descriptor);
404 isolated_media_request_context_map_[partition_descriptor] = context;
403 } 405 }
404 DCHECK(context); 406 DCHECK(context);
405 return context; 407 return context;
406 } 408 }
407 409
408 ExtensionInfoMap* ProfileIOData::GetExtensionInfoMap() const { 410 ExtensionInfoMap* ProfileIOData::GetExtensionInfoMap() const {
409 DCHECK(extension_info_map_) << "ExtensionSystem not initialized"; 411 DCHECK(extension_info_map_) << "ExtensionSystem not initialized";
410 return extension_info_map_; 412 return extension_info_map_;
411 } 413 }
412 414
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 params->http_pipelining_enabled = globals->http_pipelining_enabled; 707 params->http_pipelining_enabled = globals->http_pipelining_enabled;
706 params->testing_fixed_http_port = globals->testing_fixed_http_port; 708 params->testing_fixed_http_port = globals->testing_fixed_http_port;
707 params->testing_fixed_https_port = globals->testing_fixed_https_port; 709 params->testing_fixed_https_port = globals->testing_fixed_https_port;
708 710
709 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 711 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
710 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) { 712 if (command_line.HasSwitch(switches::kTrustedSpdyProxy)) {
711 params->trusted_spdy_proxy = command_line.GetSwitchValueASCII( 713 params->trusted_spdy_proxy = command_line.GetSwitchValueASCII(
712 switches::kTrustedSpdyProxy); 714 switches::kTrustedSpdyProxy);
713 } 715 }
714 } 716 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | chrome/browser/profiles/storage_partition_descriptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698