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

Unified Diff: content/browser/resource_context_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/resource_context_impl.h ('k') | content/browser/storage_partition_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/resource_context_impl.cc
diff --git a/content/browser/resource_context_impl.cc b/content/browser/resource_context_impl.cc
index f9f3bc890a709fce040209e892d93619bbea45bc..e7e4d0a070c2b2203e6929bcbbe292150ce3a78a 100644
--- a/content/browser/resource_context_impl.cc
+++ b/content/browser/resource_context_impl.cc
@@ -6,7 +6,6 @@
#include "base/logging.h"
#include "content/browser/fileapi/chrome_blob_storage_context.h"
-#include "content/browser/host_zoom_map_impl.h"
#include "content/browser/loader/resource_dispatcher_host_impl.h"
#include "content/browser/loader/resource_request_info_impl.h"
#include "content/browser/streams/stream_context.h"
@@ -24,19 +23,9 @@ namespace {
// Key names on ResourceContext.
const char kBlobStorageContextKeyName[] = "content_blob_storage_context";
-const char kHostZoomMapKeyName[] = "content_host_zoom_map";
const char kStreamContextKeyName[] = "content_stream_context";
const char kURLDataManagerBackendKeyName[] = "url_data_manager_backend";
-class NonOwningZoomData : public base::SupportsUserData::Data {
- public:
- explicit NonOwningZoomData(HostZoomMap* hzm) : host_zoom_map_(hzm) {}
- HostZoomMap* host_zoom_map() { return host_zoom_map_; }
-
- private:
- HostZoomMap* host_zoom_map_;
-};
-
// Used by the default implementation of GetMediaDeviceIDSalt, below.
std::string ReturnEmptySalt() {
return std::string();
@@ -92,15 +81,6 @@ StreamContext* GetStreamContextForResourceContext(
resource_context, kStreamContextKeyName);
}
-HostZoomMap* GetHostZoomMapForResourceContext(ResourceContext* context) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- NonOwningZoomData* result = static_cast<NonOwningZoomData*>(
- context->GetUserData(kHostZoomMapKeyName));
- if (!result)
- return NULL;
- return result->host_zoom_map();
-}
-
URLDataManagerBackend* GetURLDataManagerForResourceContext(
ResourceContext* context) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
@@ -114,7 +94,6 @@ URLDataManagerBackend* GetURLDataManagerForResourceContext(
void InitializeResourceContext(BrowserContext* browser_context) {
ResourceContext* resource_context = browser_context->GetResourceContext();
- DCHECK(!resource_context->GetUserData(kHostZoomMapKeyName));
resource_context->SetUserData(
kBlobStorageContextKeyName,
@@ -126,13 +105,6 @@ void InitializeResourceContext(BrowserContext* browser_context) {
new UserDataAdapter<StreamContext>(
StreamContext::GetFor(browser_context)));
- // This object is owned by the BrowserContext and not ResourceContext, so
- // store a non-owning pointer here.
- resource_context->SetUserData(
- kHostZoomMapKeyName,
- new NonOwningZoomData(
- HostZoomMap::GetDefaultForBrowserContext(browser_context)));
-
resource_context->DetachUserDataThread();
}
« no previous file with comments | « content/browser/resource_context_impl.h ('k') | content/browser/storage_partition_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698