| Index: content/browser/storage_partition_impl.cc
|
| diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc
|
| index ea344cea890da47dddd69ef693b7a21106416cf8..a09050e07f1c6849fea0da0fc5846b077eb17886 100644
|
| --- a/content/browser/storage_partition_impl.cc
|
| +++ b/content/browser/storage_partition_impl.cc
|
| @@ -9,6 +9,8 @@
|
| #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_level_context.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"
|
| @@ -355,7 +357,8 @@ StoragePartitionImpl::StoragePartitionImpl(
|
| IndexedDBContextImpl* indexed_db_context,
|
| ServiceWorkerContextWrapper* service_worker_context,
|
| WebRTCIdentityStore* webrtc_identity_store,
|
| - quota::SpecialStoragePolicy* special_storage_policy)
|
| + quota::SpecialStoragePolicy* special_storage_policy,
|
| + HostZoomLevelContext* host_zoom_level_context)
|
| : partition_path_(partition_path),
|
| quota_manager_(quota_manager),
|
| appcache_service_(appcache_service),
|
| @@ -365,7 +368,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.
|
| @@ -456,6 +460,12 @@ StoragePartitionImpl* StoragePartitionImpl::Create(
|
| scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy(
|
| context->GetSpecialStoragePolicy());
|
|
|
| + double default_zoom_level = context->GetDefaultZoomLevel();
|
| + scoped_refptr<HostZoomLevelContext> host_zoom_level_context =
|
| + new HostZoomLevelContext(context->CreateZoomLevelPrefsDelegate(),
|
| + partition_path,
|
| + default_zoom_level);
|
| +
|
| return new StoragePartitionImpl(partition_path,
|
| quota_manager.get(),
|
| appcache_service.get(),
|
| @@ -465,7 +475,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() {
|
| @@ -509,6 +520,16 @@ ServiceWorkerContextWrapper* StoragePartitionImpl::GetServiceWorkerContext() {
|
| return service_worker_context_.get();
|
| }
|
|
|
| +HostZoomMap* StoragePartitionImpl::GetHostZoomMap() {
|
| + DCHECK(host_zoom_level_context_);
|
| + return host_zoom_level_context_->GetHostZoomMap();
|
| +}
|
| +
|
| +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,
|
|
|