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

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

Issue 2938163002: Store base::Value in ContentSettingPatternSource instead of an enum (Closed)
Patch Set: ps Created 3 years, 6 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 d1431b05fd7e8569927b8996ce964fbc4db93bd2..ff700c46b6c5d4307026e97946cb4b9816532840 100644
--- a/chrome/browser/extensions/extension_special_storage_policy.cc
+++ b/chrome/browser/extensions/extension_special_storage_policy.cc
@@ -21,6 +21,7 @@
#include "components/content_settings/core/browser/cookie_settings.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings_types.h"
+#include "components/content_settings/core/common/content_settings_utils.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/storage_partition.h"
@@ -123,8 +124,10 @@ bool ExtensionSpecialStoragePolicy::HasSessionOnlyOrigins() {
ContentSettingsForOneType entries;
cookie_settings_->GetCookieSettings(&entries);
for (size_t i = 0; i < entries.size(); ++i) {
- if (entries[i].setting == CONTENT_SETTING_SESSION_ONLY)
+ if (content_settings::ValueToContentSetting(
+ entries[i].setting_value.get()) == CONTENT_SETTING_SESSION_ONLY) {
return true;
+ }
}
return false;
}

Powered by Google App Engine
This is Rietveld 408576698