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

Side by Side Diff: chrome/browser/extensions/extension_special_storage_policy.cc

Issue 2938163002: Store base::Value in ContentSettingPatternSource instead of an enum (Closed)
Patch Set: rebased Created 3 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/extension_special_storage_policy.h" 5 #include "chrome/browser/extensions/extension_special_storage_policy.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 bool ExtensionSpecialStoragePolicy::HasSessionOnlyOrigins() { 117 bool ExtensionSpecialStoragePolicy::HasSessionOnlyOrigins() {
118 if (cookie_settings_.get() == NULL) 118 if (cookie_settings_.get() == NULL)
119 return false; 119 return false;
120 if (cookie_settings_->GetDefaultCookieSetting(NULL) == 120 if (cookie_settings_->GetDefaultCookieSetting(NULL) ==
121 CONTENT_SETTING_SESSION_ONLY) 121 CONTENT_SETTING_SESSION_ONLY)
122 return true; 122 return true;
123 ContentSettingsForOneType entries; 123 ContentSettingsForOneType entries;
124 cookie_settings_->GetCookieSettings(&entries); 124 cookie_settings_->GetCookieSettings(&entries);
125 for (size_t i = 0; i < entries.size(); ++i) { 125 for (size_t i = 0; i < entries.size(); ++i) {
126 if (entries[i].setting == CONTENT_SETTING_SESSION_ONLY) 126 if (entries[i].GetContentSetting() == CONTENT_SETTING_SESSION_ONLY)
127 return true; 127 return true;
128 } 128 }
129 return false; 129 return false;
130 } 130 }
131 131
132 bool ExtensionSpecialStoragePolicy::HasIsolatedStorage(const GURL& origin) { 132 bool ExtensionSpecialStoragePolicy::HasIsolatedStorage(const GURL& origin) {
133 base::AutoLock locker(lock_); 133 base::AutoLock locker(lock_);
134 return isolated_extensions_.Contains(origin); 134 return isolated_extensions_.Contains(origin);
135 } 135 }
136 136
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 } 343 }
344 344
345 void ExtensionSpecialStoragePolicy::SpecialCollection::Clear() { 345 void ExtensionSpecialStoragePolicy::SpecialCollection::Clear() {
346 ClearCache(); 346 ClearCache();
347 extensions_.Clear(); 347 extensions_.Clear();
348 } 348 }
349 349
350 void ExtensionSpecialStoragePolicy::SpecialCollection::ClearCache() { 350 void ExtensionSpecialStoragePolicy::SpecialCollection::ClearCache() {
351 cached_results_.clear(); 351 cached_results_.clear();
352 } 352 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698