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

Unified Diff: chrome/browser/extensions/extension_special_storage_policy.cc

Issue 7713034: HostContentSettingsMap refactoring. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_special_storage_policy.cc
diff --git a/chrome/browser/extensions/extension_special_storage_policy.cc b/chrome/browser/extensions/extension_special_storage_policy.cc
index 95a2486599bab8b3a7e9c703fc0a8116cbbbc9f7..eee318d057e5647bedca103d7b600f66a5b0df9a 100644
--- a/chrome/browser/extensions/extension_special_storage_policy.cc
+++ b/chrome/browser/extensions/extension_special_storage_policy.cc
@@ -12,8 +12,8 @@
#include "content/browser/browser_thread.h"
ExtensionSpecialStoragePolicy::ExtensionSpecialStoragePolicy(
- HostContentSettingsMap* host_content_settings_map)
- : host_content_settings_map_(host_content_settings_map) {}
+ CookieContentSettings* cookie_content_settings)
+ : cookie_content_settings_(cookie_content_settings) {}
ExtensionSpecialStoragePolicy::~ExtensionSpecialStoragePolicy() {}
@@ -30,11 +30,9 @@ bool ExtensionSpecialStoragePolicy::IsStorageUnlimited(const GURL& origin) {
}
bool ExtensionSpecialStoragePolicy::IsStorageSessionOnly(const GURL& origin) {
- if (host_content_settings_map_ == NULL)
+ if (cookie_content_settings_ == NULL)
return false;
- ContentSetting content_setting = host_content_settings_map_->
- GetCookieContentSetting(origin, origin, true);
- return (content_setting == CONTENT_SETTING_SESSION_ONLY);
+ return cookie_content_settings_->EnforceSessionOnly(origin);
}
bool ExtensionSpecialStoragePolicy::IsFileHandler(

Powered by Google App Engine
This is Rietveld 408576698