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

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

Issue 2874833002: Don't compile code for desktop zoom or GuestViews on mobile platforms. (Closed)
Patch Set: Update CastBrowserContext Created 3 years, 7 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>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/gtest_prod_util.h" 14 #include "base/gtest_prod_util.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "base/memory/weak_ptr.h" 17 #include "base/memory/weak_ptr.h"
18 #include "content/browser/appcache/chrome_appcache_service.h" 18 #include "content/browser/appcache/chrome_appcache_service.h"
19 #include "content/browser/background_fetch/background_fetch_context.h" 19 #include "content/browser/background_fetch/background_fetch_context.h"
20 #include "content/browser/background_sync/background_sync_context.h" 20 #include "content/browser/background_sync/background_sync_context.h"
21 #include "content/browser/bluetooth/bluetooth_allowed_devices_map.h" 21 #include "content/browser/bluetooth/bluetooth_allowed_devices_map.h"
22 #include "content/browser/broadcast_channel/broadcast_channel_provider.h" 22 #include "content/browser/broadcast_channel/broadcast_channel_provider.h"
23 #include "content/browser/cache_storage/cache_storage_context_impl.h" 23 #include "content/browser/cache_storage/cache_storage_context_impl.h"
24 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" 24 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
25 #include "content/browser/host_zoom_level_context.h"
26 #include "content/browser/indexed_db/indexed_db_context_impl.h" 25 #include "content/browser/indexed_db/indexed_db_context_impl.h"
27 #include "content/browser/notifications/platform_notification_context_impl.h" 26 #include "content/browser/notifications/platform_notification_context_impl.h"
28 #include "content/browser/payments/payment_app_context_impl.h" 27 #include "content/browser/payments/payment_app_context_impl.h"
29 #include "content/browser/push_messaging/push_messaging_context.h" 28 #include "content/browser/push_messaging/push_messaging_context.h"
30 #include "content/browser/service_worker/service_worker_context_wrapper.h" 29 #include "content/browser/service_worker/service_worker_context_wrapper.h"
31 #include "content/common/content_export.h" 30 #include "content/common/content_export.h"
32 #include "content/common/storage_partition_service.mojom.h" 31 #include "content/common/storage_partition_service.mojom.h"
33 #include "content/public/browser/storage_partition.h" 32 #include "content/public/browser/storage_partition.h"
34 #include "mojo/public/cpp/bindings/binding_set.h" 33 #include "mojo/public/cpp/bindings/binding_set.h"
35 #include "net/cookies/cookie_store.h" 34 #include "net/cookies/cookie_store.h"
36 #include "storage/browser/quota/special_storage_policy.h" 35 #include "storage/browser/quota/special_storage_policy.h"
37 36
37 #if !defined(OS_ANDROID)
38 #include "content/browser/host_zoom_level_context.h"
39 #endif
40
38 namespace content { 41 namespace content {
39 42
40 class CONTENT_EXPORT StoragePartitionImpl 43 class CONTENT_EXPORT StoragePartitionImpl
41 : public StoragePartition, 44 : public StoragePartition,
42 public NON_EXPORTED_BASE(mojom::StoragePartitionService) { 45 public NON_EXPORTED_BASE(mojom::StoragePartitionService) {
43 public: 46 public:
44 // It is guaranteed that storage partitions are destructed before the 47 // It is guaranteed that storage partitions are destructed before the
45 // browser context starts shutting down its corresponding IO thread residents 48 // browser context starts shutting down its corresponding IO thread residents
46 // (e.g. resource context). 49 // (e.g. resource context).
47 ~StoragePartitionImpl() override; 50 ~StoragePartitionImpl() override;
(...skipping 18 matching lines...) Expand all
66 net::URLRequestContextGetter* GetURLRequestContext() override; 69 net::URLRequestContextGetter* GetURLRequestContext() override;
67 net::URLRequestContextGetter* GetMediaURLRequestContext() override; 70 net::URLRequestContextGetter* GetMediaURLRequestContext() override;
68 storage::QuotaManager* GetQuotaManager() override; 71 storage::QuotaManager* GetQuotaManager() override;
69 ChromeAppCacheService* GetAppCacheService() override; 72 ChromeAppCacheService* GetAppCacheService() override;
70 storage::FileSystemContext* GetFileSystemContext() override; 73 storage::FileSystemContext* GetFileSystemContext() override;
71 storage::DatabaseTracker* GetDatabaseTracker() override; 74 storage::DatabaseTracker* GetDatabaseTracker() override;
72 DOMStorageContextWrapper* GetDOMStorageContext() override; 75 DOMStorageContextWrapper* GetDOMStorageContext() override;
73 IndexedDBContextImpl* GetIndexedDBContext() override; 76 IndexedDBContextImpl* GetIndexedDBContext() override;
74 CacheStorageContextImpl* GetCacheStorageContext() override; 77 CacheStorageContextImpl* GetCacheStorageContext() override;
75 ServiceWorkerContextWrapper* GetServiceWorkerContext() override; 78 ServiceWorkerContextWrapper* GetServiceWorkerContext() override;
79 #if !defined(OS_ANDROID)
76 HostZoomMap* GetHostZoomMap() override; 80 HostZoomMap* GetHostZoomMap() override;
77 HostZoomLevelContext* GetHostZoomLevelContext() override; 81 HostZoomLevelContext* GetHostZoomLevelContext() override;
78 ZoomLevelDelegate* GetZoomLevelDelegate() override; 82 ZoomLevelDelegate* GetZoomLevelDelegate() override;
83 #endif // !defined(OS_ANDROID)
79 PlatformNotificationContextImpl* GetPlatformNotificationContext() override; 84 PlatformNotificationContextImpl* GetPlatformNotificationContext() override;
80 void ClearBluetoothAllowedDevicesMapForTesting() override; 85 void ClearBluetoothAllowedDevicesMapForTesting() override;
81 86
82 BackgroundFetchContext* GetBackgroundFetchContext(); 87 BackgroundFetchContext* GetBackgroundFetchContext();
83 BackgroundSyncContext* GetBackgroundSyncContext(); 88 BackgroundSyncContext* GetBackgroundSyncContext();
84 PaymentAppContextImpl* GetPaymentAppContext(); 89 PaymentAppContextImpl* GetPaymentAppContext();
85 BroadcastChannelProvider* GetBroadcastChannelProvider(); 90 BroadcastChannelProvider* GetBroadcastChannelProvider();
86 BluetoothAllowedDevicesMap* GetBluetoothAllowedDevicesMap(); 91 BluetoothAllowedDevicesMap* GetBluetoothAllowedDevicesMap();
87 92
88 // mojom::StoragePartitionService interface. 93 // mojom::StoragePartitionService interface.
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 scoped_refptr<storage::QuotaManager> quota_manager_; 224 scoped_refptr<storage::QuotaManager> quota_manager_;
220 scoped_refptr<ChromeAppCacheService> appcache_service_; 225 scoped_refptr<ChromeAppCacheService> appcache_service_;
221 scoped_refptr<storage::FileSystemContext> filesystem_context_; 226 scoped_refptr<storage::FileSystemContext> filesystem_context_;
222 scoped_refptr<storage::DatabaseTracker> database_tracker_; 227 scoped_refptr<storage::DatabaseTracker> database_tracker_;
223 scoped_refptr<DOMStorageContextWrapper> dom_storage_context_; 228 scoped_refptr<DOMStorageContextWrapper> dom_storage_context_;
224 scoped_refptr<IndexedDBContextImpl> indexed_db_context_; 229 scoped_refptr<IndexedDBContextImpl> indexed_db_context_;
225 scoped_refptr<CacheStorageContextImpl> cache_storage_context_; 230 scoped_refptr<CacheStorageContextImpl> cache_storage_context_;
226 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_; 231 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
227 scoped_refptr<PushMessagingContext> push_messaging_context_; 232 scoped_refptr<PushMessagingContext> push_messaging_context_;
228 scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_; 233 scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_;
234 #if !defined(OS_ANDROID)
229 scoped_refptr<HostZoomLevelContext> host_zoom_level_context_; 235 scoped_refptr<HostZoomLevelContext> host_zoom_level_context_;
236 #endif // !defined(OS_ANDROID)
230 scoped_refptr<PlatformNotificationContextImpl> platform_notification_context_; 237 scoped_refptr<PlatformNotificationContextImpl> platform_notification_context_;
231 scoped_refptr<BackgroundFetchContext> background_fetch_context_; 238 scoped_refptr<BackgroundFetchContext> background_fetch_context_;
232 scoped_refptr<BackgroundSyncContext> background_sync_context_; 239 scoped_refptr<BackgroundSyncContext> background_sync_context_;
233 scoped_refptr<PaymentAppContextImpl> payment_app_context_; 240 scoped_refptr<PaymentAppContextImpl> payment_app_context_;
234 scoped_refptr<BroadcastChannelProvider> broadcast_channel_provider_; 241 scoped_refptr<BroadcastChannelProvider> broadcast_channel_provider_;
235 scoped_refptr<BluetoothAllowedDevicesMap> bluetooth_allowed_devices_map_; 242 scoped_refptr<BluetoothAllowedDevicesMap> bluetooth_allowed_devices_map_;
236 243
237 mojo::BindingSet<mojom::StoragePartitionService> bindings_; 244 mojo::BindingSet<mojom::StoragePartitionService> bindings_;
238 245
239 // Raw pointer that should always be valid. The BrowserContext owns the 246 // Raw pointer that should always be valid. The BrowserContext owns the
240 // StoragePartitionImplMap which then owns StoragePartitionImpl. When the 247 // StoragePartitionImplMap which then owns StoragePartitionImpl. When the
241 // BrowserContext is destroyed, |this| will be destroyed too. 248 // BrowserContext is destroyed, |this| will be destroyed too.
242 BrowserContext* browser_context_; 249 BrowserContext* browser_context_;
243 250
244 base::WeakPtrFactory<StoragePartitionImpl> weak_factory_; 251 base::WeakPtrFactory<StoragePartitionImpl> weak_factory_;
245 252
246 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl); 253 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl);
247 }; 254 };
248 255
249 } // namespace content 256 } // namespace content
250 257
251 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ 258 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698