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

Unified Diff: content/browser/storage_partition_impl.cc

Issue 393133002: Migrate HostZoomMap to live in StoragePartition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments; patch for landing. Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/storage_partition_impl.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/storage_partition_impl.cc
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc
index d4e49f60f13482f61466d478c7d90823df66901a..d5b83bce34d24c27ee2efaef67f6adfafb910187 100644
--- a/content/browser/storage_partition_impl.cc
+++ b/content/browser/storage_partition_impl.cc
@@ -10,6 +10,7 @@
#include "content/browser/fileapi/browser_file_system_helper.h"
#include "content/browser/geofencing/geofencing_manager.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"
@@ -368,7 +369,8 @@ StoragePartitionImpl::StoragePartitionImpl(
ServiceWorkerContextWrapper* service_worker_context,
WebRTCIdentityStore* webrtc_identity_store,
storage::SpecialStoragePolicy* special_storage_policy,
- GeofencingManager* geofencing_manager)
+ GeofencingManager* geofencing_manager,
+ HostZoomLevelContext* host_zoom_level_context)
: partition_path_(partition_path),
quota_manager_(quota_manager),
appcache_service_(appcache_service),
@@ -379,7 +381,8 @@ StoragePartitionImpl::StoragePartitionImpl(
service_worker_context_(service_worker_context),
webrtc_identity_store_(webrtc_identity_store),
special_storage_policy_(special_storage_policy),
- geofencing_manager_(geofencing_manager) {
+ geofencing_manager_(geofencing_manager),
+ host_zoom_level_context_(host_zoom_level_context) {
}
StoragePartitionImpl::~StoragePartitionImpl() {
@@ -478,6 +481,10 @@ StoragePartitionImpl* StoragePartitionImpl::Create(
new GeofencingManager(service_worker_context);
geofencing_manager->Init();
+ scoped_refptr<HostZoomLevelContext> host_zoom_level_context(
+ new HostZoomLevelContext(
+ context->CreateZoomLevelDelegate(partition_path)));
+
return new StoragePartitionImpl(partition_path,
quota_manager.get(),
appcache_service.get(),
@@ -488,7 +495,8 @@ StoragePartitionImpl* StoragePartitionImpl::Create(
service_worker_context.get(),
webrtc_identity_store.get(),
special_storage_policy.get(),
- geofencing_manager.get());
+ geofencing_manager.get(),
+ host_zoom_level_context.get());
}
base::FilePath StoragePartitionImpl::GetPath() {
@@ -536,6 +544,20 @@ GeofencingManager* StoragePartitionImpl::GetGeofencingManager() {
return geofencing_manager_.get();
}
+HostZoomMap* StoragePartitionImpl::GetHostZoomMap() {
+ DCHECK(host_zoom_level_context_.get());
+ return host_zoom_level_context_->GetHostZoomMap();
+}
+
+HostZoomLevelContext* StoragePartitionImpl::GetHostZoomLevelContext() {
+ return host_zoom_level_context_.get();
+}
+
+ZoomLevelDelegate* StoragePartitionImpl::GetZoomLevelDelegate() {
+ DCHECK(host_zoom_level_context_.get());
+ return host_zoom_level_context_->GetZoomLevelDelegate();
+}
+
void StoragePartitionImpl::ClearDataImpl(
uint32 remove_mask,
uint32 quota_storage_remove_mask,
« no previous file with comments | « content/browser/storage_partition_impl.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698