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

Side by Side Diff: content/browser/storage_partition_impl.h

Issue 2976323002: Hook up ProfileIOData's URLRequestContext to a NetworkService. (Closed)
Patch Set: Response to comments Created 3 years, 5 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 #ifndef CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ 5 #ifndef CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_
6 #define CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ 6 #define CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 void OverrideQuotaManagerForTesting( 67 void OverrideQuotaManagerForTesting(
68 storage::QuotaManager* quota_manager); 68 storage::QuotaManager* quota_manager);
69 void OverrideSpecialStoragePolicyForTesting( 69 void OverrideSpecialStoragePolicyForTesting(
70 storage::SpecialStoragePolicy* special_storage_policy); 70 storage::SpecialStoragePolicy* special_storage_policy);
71 71
72 // StoragePartition interface. 72 // StoragePartition interface.
73 base::FilePath GetPath() override; 73 base::FilePath GetPath() override;
74 net::URLRequestContextGetter* GetURLRequestContext() override; 74 net::URLRequestContextGetter* GetURLRequestContext() override;
75 net::URLRequestContextGetter* GetMediaURLRequestContext() override; 75 net::URLRequestContextGetter* GetMediaURLRequestContext() override;
76 mojom::NetworkContext* GetNetworkContext() override;
76 storage::QuotaManager* GetQuotaManager() override; 77 storage::QuotaManager* GetQuotaManager() override;
77 ChromeAppCacheService* GetAppCacheService() override; 78 ChromeAppCacheService* GetAppCacheService() override;
78 storage::FileSystemContext* GetFileSystemContext() override; 79 storage::FileSystemContext* GetFileSystemContext() override;
79 storage::DatabaseTracker* GetDatabaseTracker() override; 80 storage::DatabaseTracker* GetDatabaseTracker() override;
80 DOMStorageContextWrapper* GetDOMStorageContext() override; 81 DOMStorageContextWrapper* GetDOMStorageContext() override;
81 IndexedDBContextImpl* GetIndexedDBContext() override; 82 IndexedDBContextImpl* GetIndexedDBContext() override;
82 CacheStorageContextImpl* GetCacheStorageContext() override; 83 CacheStorageContextImpl* GetCacheStorageContext() override;
83 ServiceWorkerContextWrapper* GetServiceWorkerContext() override; 84 ServiceWorkerContextWrapper* GetServiceWorkerContext() override;
84 #if !defined(OS_ANDROID) 85 #if !defined(OS_ANDROID)
85 HostZoomMap* GetHostZoomMap() override; 86 HostZoomMap* GetHostZoomMap() override;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 BroadcastChannelProvider* GetBroadcastChannelProvider(); 121 BroadcastChannelProvider* GetBroadcastChannelProvider();
121 BluetoothAllowedDevicesMap* GetBluetoothAllowedDevicesMap(); 122 BluetoothAllowedDevicesMap* GetBluetoothAllowedDevicesMap();
122 BlobURLLoaderFactory* GetBlobURLLoaderFactory(); 123 BlobURLLoaderFactory* GetBlobURLLoaderFactory();
123 BlobRegistryWrapper* GetBlobRegistry(); 124 BlobRegistryWrapper* GetBlobRegistry();
124 125
125 // mojom::StoragePartitionService interface. 126 // mojom::StoragePartitionService interface.
126 void OpenLocalStorage( 127 void OpenLocalStorage(
127 const url::Origin& origin, 128 const url::Origin& origin,
128 mojo::InterfaceRequest<mojom::LevelDBWrapper> request) override; 129 mojo::InterfaceRequest<mojom::LevelDBWrapper> request) override;
129 130
130 // Returns the NetworkContext associated with this storage partition. Only
131 // used when the network service is enabled.
132 mojom::NetworkContext* network_context() { return network_context_.get(); }
133
134 scoped_refptr<URLLoaderFactoryGetter> url_loader_factory_getter() { 131 scoped_refptr<URLLoaderFactoryGetter> url_loader_factory_getter() {
135 return url_loader_factory_getter_; 132 return url_loader_factory_getter_;
136 } 133 }
137 134
138 // Can return nullptr while |this| is being destroyed. 135 // Can return nullptr while |this| is being destroyed.
139 BrowserContext* browser_context() const; 136 BrowserContext* browser_context() const;
140 137
141 // Called by each renderer process once. 138 // Called by each renderer process once.
142 void Bind(mojo::InterfaceRequest<mojom::StoragePartitionService> request); 139 void Bind(mojo::InterfaceRequest<mojom::StoragePartitionService> request);
143 140
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 scoped_refptr<PlatformNotificationContextImpl> platform_notification_context_; 246 scoped_refptr<PlatformNotificationContextImpl> platform_notification_context_;
250 scoped_refptr<BackgroundFetchContext> background_fetch_context_; 247 scoped_refptr<BackgroundFetchContext> background_fetch_context_;
251 scoped_refptr<BackgroundSyncContext> background_sync_context_; 248 scoped_refptr<BackgroundSyncContext> background_sync_context_;
252 scoped_refptr<PaymentAppContextImpl> payment_app_context_; 249 scoped_refptr<PaymentAppContextImpl> payment_app_context_;
253 scoped_refptr<BroadcastChannelProvider> broadcast_channel_provider_; 250 scoped_refptr<BroadcastChannelProvider> broadcast_channel_provider_;
254 scoped_refptr<BluetoothAllowedDevicesMap> bluetooth_allowed_devices_map_; 251 scoped_refptr<BluetoothAllowedDevicesMap> bluetooth_allowed_devices_map_;
255 scoped_refptr<BlobURLLoaderFactory> blob_url_loader_factory_; 252 scoped_refptr<BlobURLLoaderFactory> blob_url_loader_factory_;
256 scoped_refptr<BlobRegistryWrapper> blob_registry_; 253 scoped_refptr<BlobRegistryWrapper> blob_registry_;
257 254
258 mojo::BindingSet<mojom::StoragePartitionService> bindings_; 255 mojo::BindingSet<mojom::StoragePartitionService> bindings_;
256
257 // When the network service is enabled, this is the NetworkContext used to
258 // make requests for the StoragePartition. When it's disabled, this is
259 // nullptr.
259 mojom::NetworkContextPtr network_context_; 260 mojom::NetworkContextPtr network_context_;
260 261
261 // Raw pointer that should always be valid. The BrowserContext owns the 262 // Raw pointer that should always be valid. The BrowserContext owns the
262 // StoragePartitionImplMap which then owns StoragePartitionImpl. When the 263 // StoragePartitionImplMap which then owns StoragePartitionImpl. When the
263 // BrowserContext is destroyed, |this| will be destroyed too. 264 // BrowserContext is destroyed, |this| will be destroyed too.
264 BrowserContext* browser_context_; 265 BrowserContext* browser_context_;
265 266
266 base::WeakPtrFactory<StoragePartitionImpl> weak_factory_; 267 base::WeakPtrFactory<StoragePartitionImpl> weak_factory_;
267 268
268 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl); 269 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl);
269 }; 270 };
270 271
271 } // namespace content 272 } // namespace content
272 273
273 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ 274 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/browser/storage_partition_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698