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

Side by Side Diff: content/browser/storage_partition_impl_map.cc

Issue 861373002: Refactor navigator.connect code to make it more flexible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo Created 5 years, 10 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 "content/browser/storage_partition_impl_map.h" 5 #include "content/browser/storage_partition_impl_map.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/files/file_enumerator.h" 9 #include "base/files/file_enumerator.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 12 matching lines...) Expand all
23 #include "content/browser/service_worker/service_worker_request_handler.h" 23 #include "content/browser/service_worker/service_worker_request_handler.h"
24 #include "content/browser/storage_partition_impl.h" 24 #include "content/browser/storage_partition_impl.h"
25 #include "content/browser/streams/stream.h" 25 #include "content/browser/streams/stream.h"
26 #include "content/browser/streams/stream_context.h" 26 #include "content/browser/streams/stream_context.h"
27 #include "content/browser/streams/stream_registry.h" 27 #include "content/browser/streams/stream_registry.h"
28 #include "content/browser/streams/stream_url_request_job.h" 28 #include "content/browser/streams/stream_url_request_job.h"
29 #include "content/browser/webui/url_data_manager_backend.h" 29 #include "content/browser/webui/url_data_manager_backend.h"
30 #include "content/public/browser/browser_context.h" 30 #include "content/public/browser/browser_context.h"
31 #include "content/public/browser/browser_thread.h" 31 #include "content/public/browser/browser_thread.h"
32 #include "content/public/browser/content_browser_client.h" 32 #include "content/public/browser/content_browser_client.h"
33 #include "content/public/browser/navigator_connect_context.h"
34 #include "content/public/browser/navigator_connect_service_factory.h"
33 #include "content/public/browser/storage_partition.h" 35 #include "content/public/browser/storage_partition.h"
34 #include "content/public/common/content_constants.h" 36 #include "content/public/common/content_constants.h"
35 #include "content/public/common/url_constants.h" 37 #include "content/public/common/url_constants.h"
36 #include "crypto/sha2.h" 38 #include "crypto/sha2.h"
37 #include "net/url_request/url_request_context.h" 39 #include "net/url_request/url_request_context.h"
38 #include "net/url_request/url_request_context_getter.h" 40 #include "net/url_request/url_request_context_getter.h"
39 #include "storage/browser/blob/blob_storage_context.h" 41 #include "storage/browser/blob/blob_storage_context.h"
40 #include "storage/browser/blob/blob_url_request_job_factory.h" 42 #include "storage/browser/blob/blob_url_request_job_factory.h"
41 #include "storage/browser/fileapi/file_system_url_request_job_factory.h" 43 #include "storage/browser/fileapi/file_system_url_request_job_factory.h"
42 44
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 in_memory, 455 in_memory,
454 &protocol_handlers, 456 &protocol_handlers,
455 request_interceptors.Pass())); 457 request_interceptors.Pass()));
456 } 458 }
457 partition->SetMediaURLRequestContext( 459 partition->SetMediaURLRequestContext(
458 partition_domain.empty() ? 460 partition_domain.empty() ?
459 browser_context_->GetMediaRequestContext() : 461 browser_context_->GetMediaRequestContext() :
460 browser_context_->GetMediaRequestContextForStoragePartition( 462 browser_context_->GetMediaRequestContextForStoragePartition(
461 partition->GetPath(), in_memory)); 463 partition->GetPath(), in_memory));
462 464
465 GetContentClient()->browser()->GetAdditionalNavigatorConnectServices(
466 partition->GetNavigatorConnectContext());
467
463 PostCreateInitialization(partition, in_memory); 468 PostCreateInitialization(partition, in_memory);
464 469
465 return partition; 470 return partition;
466 } 471 }
467 472
468 void StoragePartitionImplMap::AsyncObliterate( 473 void StoragePartitionImplMap::AsyncObliterate(
469 const GURL& site, 474 const GURL& site,
470 const base::Closure& on_gc_required) { 475 const base::Closure& on_gc_required) {
471 // This method should avoid creating any StoragePartition (which would 476 // This method should avoid creating any StoragePartition (which would
472 // create more open file handles) so that it can delete as much of the 477 // create more open file handles) so that it can delete as much of the
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 595
591 // We do not call InitializeURLRequestContext() for media contexts because, 596 // We do not call InitializeURLRequestContext() for media contexts because,
592 // other than the HTTP cache, the media contexts share the same backing 597 // other than the HTTP cache, the media contexts share the same backing
593 // objects as their associated "normal" request context. Thus, the previous 598 // objects as their associated "normal" request context. Thus, the previous
594 // call serves to initialize the media request context for this storage 599 // call serves to initialize the media request context for this storage
595 // partition as well. 600 // partition as well.
596 } 601 }
597 } 602 }
598 603
599 } // namespace content 604 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/storage_partition_impl.cc ('k') | content/child/navigator_connect/navigator_connect_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698