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

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

Issue 2874833002: Don't compile code for desktop zoom or GuestViews on mobile platforms. (Closed)
Patch Set: Rebase. 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 #include "content/browser/storage_partition_impl.h" 5 #include "content/browser/storage_partition_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/location.h" 14 #include "base/location.h"
15 #include "base/sequenced_task_runner.h" 15 #include "base/sequenced_task_runner.h"
16 #include "base/single_thread_task_runner.h" 16 #include "base/single_thread_task_runner.h"
17 #include "base/strings/utf_string_conversions.h" 17 #include "base/strings/utf_string_conversions.h"
18 #include "content/browser/browser_main_loop.h" 18 #include "content/browser/browser_main_loop.h"
19 #include "content/browser/browsing_data/storage_partition_http_cache_data_remove r.h" 19 #include "content/browser/browsing_data/storage_partition_http_cache_data_remove r.h"
20 #include "content/browser/fileapi/browser_file_system_helper.h" 20 #include "content/browser/fileapi/browser_file_system_helper.h"
21 #include "content/browser/gpu/shader_cache_factory.h" 21 #include "content/browser/gpu/shader_cache_factory.h"
22 #include "content/browser/host_zoom_map_impl.h"
23 #include "content/browser/notifications/platform_notification_context_impl.h" 22 #include "content/browser/notifications/platform_notification_context_impl.h"
24 #include "content/common/dom_storage/dom_storage_types.h" 23 #include "content/common/dom_storage/dom_storage_types.h"
25 #include "content/public/browser/browser_context.h" 24 #include "content/public/browser/browser_context.h"
26 #include "content/public/browser/browser_thread.h" 25 #include "content/public/browser/browser_thread.h"
27 #include "content/public/browser/content_browser_client.h" 26 #include "content/public/browser/content_browser_client.h"
28 #include "content/public/browser/dom_storage_context.h" 27 #include "content/public/browser/dom_storage_context.h"
29 #include "content/public/browser/indexed_db_context.h" 28 #include "content/public/browser/indexed_db_context.h"
30 #include "content/public/browser/local_storage_usage_info.h" 29 #include "content/public/browser/local_storage_usage_info.h"
31 #include "content/public/browser/session_storage_usage_info.h" 30 #include "content/public/browser/session_storage_usage_info.h"
32 #include "content/public/common/content_client.h" 31 #include "content/public/common/content_client.h"
33 #include "content/public/common/content_switches.h" 32 #include "content/public/common/content_switches.h"
34 #include "content/public/common/service_manager_connection.h" 33 #include "content/public/common/service_manager_connection.h"
35 #include "content/public/common/service_names.mojom.h" 34 #include "content/public/common/service_names.mojom.h"
36 #include "net/base/completion_callback.h" 35 #include "net/base/completion_callback.h"
37 #include "net/base/net_errors.h" 36 #include "net/base/net_errors.h"
38 #include "net/cookies/canonical_cookie.h" 37 #include "net/cookies/canonical_cookie.h"
39 #include "net/cookies/cookie_monster.h" 38 #include "net/cookies/cookie_monster.h"
40 #include "net/url_request/url_request_context.h" 39 #include "net/url_request/url_request_context.h"
41 #include "net/url_request/url_request_context_getter.h" 40 #include "net/url_request/url_request_context_getter.h"
42 #include "ppapi/features/features.h" 41 #include "ppapi/features/features.h"
43 #include "services/service_manager/public/cpp/connector.h" 42 #include "services/service_manager/public/cpp/connector.h"
44 #include "storage/browser/database/database_tracker.h" 43 #include "storage/browser/database/database_tracker.h"
45 #include "storage/browser/quota/quota_manager.h" 44 #include "storage/browser/quota/quota_manager.h"
46 45
46 #if !defined(OS_ANDROID)
47 #include "content/browser/host_zoom_map_impl.h"
48 #endif // !defined(OS_ANDROID)
49
47 #if BUILDFLAG(ENABLE_PLUGINS) 50 #if BUILDFLAG(ENABLE_PLUGINS)
48 #include "content/browser/plugin_private_storage_helper.h" 51 #include "content/browser/plugin_private_storage_helper.h"
49 #endif // BUILDFLAG(ENABLE_PLUGINS) 52 #endif // BUILDFLAG(ENABLE_PLUGINS)
50 53
51 namespace content { 54 namespace content {
52 55
53 namespace { 56 namespace {
54 57
55 bool DoesCookieMatchHost(const std::string& host, 58 bool DoesCookieMatchHost(const std::string& host,
56 const net::CanonicalCookie& cookie) { 59 const net::CanonicalCookie& cookie) {
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 partition->service_worker_context_->Init(path, quota_manager_proxy.get(), 486 partition->service_worker_context_->Init(path, quota_manager_proxy.get(),
484 context->GetSpecialStoragePolicy()); 487 context->GetSpecialStoragePolicy());
485 partition->service_worker_context_->set_storage_partition(partition.get()); 488 partition->service_worker_context_->set_storage_partition(partition.get());
486 489
487 partition->appcache_service_ = 490 partition->appcache_service_ =
488 new ChromeAppCacheService(quota_manager_proxy.get()); 491 new ChromeAppCacheService(quota_manager_proxy.get());
489 492
490 partition->push_messaging_context_ = 493 partition->push_messaging_context_ =
491 new PushMessagingContext(context, partition->service_worker_context_); 494 new PushMessagingContext(context, partition->service_worker_context_);
492 495
496 #if !defined(OS_ANDROID)
493 partition->host_zoom_level_context_ = new HostZoomLevelContext( 497 partition->host_zoom_level_context_ = new HostZoomLevelContext(
494 context->CreateZoomLevelDelegate(partition_path)); 498 context->CreateZoomLevelDelegate(partition_path));
499 #endif // !defined(OS_ANDROID)
495 500
496 partition->platform_notification_context_ = 501 partition->platform_notification_context_ =
497 new PlatformNotificationContextImpl(path, context, 502 new PlatformNotificationContextImpl(path, context,
498 partition->service_worker_context_); 503 partition->service_worker_context_);
499 partition->platform_notification_context_->Initialize(); 504 partition->platform_notification_context_->Initialize();
500 505
501 partition->background_fetch_context_ = new BackgroundFetchContext( 506 partition->background_fetch_context_ = new BackgroundFetchContext(
502 context, partition.get(), partition->service_worker_context_); 507 context, partition.get(), partition->service_worker_context_);
503 508
504 partition->background_sync_context_ = new BackgroundSyncContext(); 509 partition->background_sync_context_ = new BackgroundSyncContext();
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 } 574 }
570 575
571 CacheStorageContextImpl* StoragePartitionImpl::GetCacheStorageContext() { 576 CacheStorageContextImpl* StoragePartitionImpl::GetCacheStorageContext() {
572 return cache_storage_context_.get(); 577 return cache_storage_context_.get();
573 } 578 }
574 579
575 ServiceWorkerContextWrapper* StoragePartitionImpl::GetServiceWorkerContext() { 580 ServiceWorkerContextWrapper* StoragePartitionImpl::GetServiceWorkerContext() {
576 return service_worker_context_.get(); 581 return service_worker_context_.get();
577 } 582 }
578 583
584 #if !defined(OS_ANDROID)
579 HostZoomMap* StoragePartitionImpl::GetHostZoomMap() { 585 HostZoomMap* StoragePartitionImpl::GetHostZoomMap() {
580 DCHECK(host_zoom_level_context_.get()); 586 DCHECK(host_zoom_level_context_.get());
581 return host_zoom_level_context_->GetHostZoomMap(); 587 return host_zoom_level_context_->GetHostZoomMap();
582 } 588 }
583 589
584 HostZoomLevelContext* StoragePartitionImpl::GetHostZoomLevelContext() { 590 HostZoomLevelContext* StoragePartitionImpl::GetHostZoomLevelContext() {
585 return host_zoom_level_context_.get(); 591 return host_zoom_level_context_.get();
586 } 592 }
587 593
588 ZoomLevelDelegate* StoragePartitionImpl::GetZoomLevelDelegate() { 594 ZoomLevelDelegate* StoragePartitionImpl::GetZoomLevelDelegate() {
589 DCHECK(host_zoom_level_context_.get()); 595 DCHECK(host_zoom_level_context_.get());
590 return host_zoom_level_context_->GetZoomLevelDelegate(); 596 return host_zoom_level_context_->GetZoomLevelDelegate();
591 } 597 }
598 #endif // !defined(OS_ANDROID)
592 599
593 PlatformNotificationContextImpl* 600 PlatformNotificationContextImpl*
594 StoragePartitionImpl::GetPlatformNotificationContext() { 601 StoragePartitionImpl::GetPlatformNotificationContext() {
595 return platform_notification_context_.get(); 602 return platform_notification_context_.get();
596 } 603 }
597 604
598 BackgroundFetchContext* StoragePartitionImpl::GetBackgroundFetchContext() { 605 BackgroundFetchContext* StoragePartitionImpl::GetBackgroundFetchContext() {
599 return background_fetch_context_.get(); 606 return background_fetch_context_.get();
600 } 607 }
601 608
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 media_url_request_context_ = media_url_request_context; 962 media_url_request_context_ = media_url_request_context;
956 } 963 }
957 964
958 void StoragePartitionImpl::GetQuotaSettings( 965 void StoragePartitionImpl::GetQuotaSettings(
959 const storage::OptionalQuotaSettingsCallback& callback) { 966 const storage::OptionalQuotaSettingsCallback& callback) {
960 GetContentClient()->browser()->GetQuotaSettings(browser_context_, this, 967 GetContentClient()->browser()->GetQuotaSettings(browser_context_, this,
961 callback); 968 callback);
962 } 969 }
963 970
964 } // namespace content 971 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/storage_partition_impl.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698