Index: content/browser/storage_partition_impl.cc |
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc |
index 36af20223f30f2fcc7ad58663541c231fd30c0c8..257442495db85c20c07b4e8b9886fed5396e5583 100644 |
--- a/content/browser/storage_partition_impl.cc |
+++ b/content/browser/storage_partition_impl.cc |
@@ -9,6 +9,7 @@ |
#include "content/browser/browser_main_loop.h" |
#include "content/browser/fileapi/browser_file_system_helper.h" |
#include "content/browser/gpu/shader_disk_cache.h" |
+#include "content/browser/host_zoom_map_impl.h" |
#include "content/common/dom_storage/dom_storage_types.h" |
#include "content/public/browser/browser_context.h" |
#include "content/public/browser/browser_thread.h" |
@@ -362,7 +363,8 @@ StoragePartitionImpl::StoragePartitionImpl( |
IndexedDBContextImpl* indexed_db_context, |
ServiceWorkerContextWrapper* service_worker_context, |
WebRTCIdentityStore* webrtc_identity_store, |
- storage::SpecialStoragePolicy* special_storage_policy) |
+ storage::SpecialStoragePolicy* special_storage_policy, |
+ HostZoomLevelContext* host_zoom_level_context) |
: partition_path_(partition_path), |
quota_manager_(quota_manager), |
appcache_service_(appcache_service), |
@@ -372,8 +374,8 @@ StoragePartitionImpl::StoragePartitionImpl( |
indexed_db_context_(indexed_db_context), |
service_worker_context_(service_worker_context), |
webrtc_identity_store_(webrtc_identity_store), |
- special_storage_policy_(special_storage_policy) { |
-} |
+ special_storage_policy_(special_storage_policy), |
+ host_zoom_level_context_(host_zoom_level_context) {} |
StoragePartitionImpl::~StoragePartitionImpl() { |
// These message loop checks are just to avoid leaks in unittests. |
@@ -463,6 +465,10 @@ StoragePartitionImpl* StoragePartitionImpl::Create( |
scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy( |
context->GetSpecialStoragePolicy()); |
+ scoped_refptr<HostZoomLevelContext> host_zoom_level_context( |
+ new HostZoomLevelContext(context->CreateZoomLevelPrefsStore(), |
+ partition_path)); |
+ |
return new StoragePartitionImpl(partition_path, |
quota_manager.get(), |
appcache_service.get(), |
@@ -472,7 +478,8 @@ StoragePartitionImpl* StoragePartitionImpl::Create( |
indexed_db_context.get(), |
service_worker_context.get(), |
webrtc_identity_store.get(), |
- special_storage_policy.get()); |
+ special_storage_policy.get(), |
+ host_zoom_level_context.get()); |
} |
base::FilePath StoragePartitionImpl::GetPath() { |
@@ -516,6 +523,20 @@ ServiceWorkerContextWrapper* StoragePartitionImpl::GetServiceWorkerContext() { |
return service_worker_context_.get(); |
} |
+HostZoomMap* StoragePartitionImpl::GetHostZoomMap() { |
+ DCHECK(host_zoom_level_context_); |
+ return host_zoom_level_context_->GetHostZoomMap(); |
+} |
+ |
+HostZoomLevelContext* StoragePartitionImpl::GetHostZoomLevelContext() { |
+ return host_zoom_level_context_.get(); |
+} |
+ |
+PrefService* StoragePartitionImpl::GetZoomLevelPrefs() { |
+ DCHECK(host_zoom_level_context_); |
+ return host_zoom_level_context_->GetZoomLevelPrefs(); |
+} |
+ |
void StoragePartitionImpl::ClearDataImpl( |
uint32 remove_mask, |
uint32 quota_storage_remove_mask, |