OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "chrome/browser/content_settings/cookie_settings.h" | 9 #include "chrome/browser/content_settings/cookie_settings.h" |
10 #include "chrome/common/content_settings.h" | 10 #include "chrome/common/content_settings.h" |
11 #include "chrome/common/content_settings_types.h" | 11 #include "chrome/common/content_settings_types.h" |
12 #include "chrome/common/extensions/extension.h" | 12 #include "chrome/common/extensions/extension.h" |
13 #include "chrome/common/url_constants.h" | 13 #include "chrome/common/url_constants.h" |
14 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
15 | 15 |
| 16 using content::BrowserThread; |
| 17 |
16 ExtensionSpecialStoragePolicy::ExtensionSpecialStoragePolicy( | 18 ExtensionSpecialStoragePolicy::ExtensionSpecialStoragePolicy( |
17 CookieSettings* cookie_settings) | 19 CookieSettings* cookie_settings) |
18 : cookie_settings_(cookie_settings) {} | 20 : cookie_settings_(cookie_settings) {} |
19 | 21 |
20 ExtensionSpecialStoragePolicy::~ExtensionSpecialStoragePolicy() {} | 22 ExtensionSpecialStoragePolicy::~ExtensionSpecialStoragePolicy() {} |
21 | 23 |
22 bool ExtensionSpecialStoragePolicy::IsStorageProtected(const GURL& origin) { | 24 bool ExtensionSpecialStoragePolicy::IsStorageProtected(const GURL& origin) { |
23 if (origin.SchemeIs(chrome::kExtensionScheme)) | 25 if (origin.SchemeIs(chrome::kExtensionScheme)) |
24 return true; | 26 return true; |
25 base::AutoLock locker(lock_); | 27 base::AutoLock locker(lock_); |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 void ExtensionSpecialStoragePolicy::SpecialCollection::Remove( | 166 void ExtensionSpecialStoragePolicy::SpecialCollection::Remove( |
165 const Extension* extension) { | 167 const Extension* extension) { |
166 cached_results_.clear(); | 168 cached_results_.clear(); |
167 extensions_.erase(extension->id()); | 169 extensions_.erase(extension->id()); |
168 } | 170 } |
169 | 171 |
170 void ExtensionSpecialStoragePolicy::SpecialCollection::Clear() { | 172 void ExtensionSpecialStoragePolicy::SpecialCollection::Clear() { |
171 cached_results_.clear(); | 173 cached_results_.clear(); |
172 extensions_.clear(); | 174 extensions_.clear(); |
173 } | 175 } |
OLD | NEW |