OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_NET_CHROME_SPECIAL_STORAGE_POLICY_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_NET_CHROME_SPECIAL_STORAGE_POLICY_DELEGATE_H_ |
| 7 |
| 8 #include "net/sqlite/special_storage_policy_delegate.h" |
| 9 #include "webkit/browser/quota/special_storage_policy.h" |
| 10 |
| 11 // Interface to determine whether session-only data has to be deleted at the |
| 12 // end of the session. |
| 13 class ChromeSpecialStoragePolicyDelegate |
| 14 : public net::SpecialStoragePolicyDelegate { |
| 15 public: |
| 16 ChromeSpecialStoragePolicyDelegate( |
| 17 quota::SpecialStoragePolicy* special_storage_policy); |
| 18 virtual ~ChromeSpecialStoragePolicyDelegate(); |
| 19 |
| 20 // Some origins are only allowed to store session-only data which is deleted |
| 21 // when the session ends. |
| 22 virtual bool IsStorageSessionOnly(const GURL& origin) OVERRIDE; |
| 23 |
| 24 // Returns true if some origins are only allowed session-only storage. |
| 25 virtual bool HasSessionOnlyOrigins() OVERRIDE; |
| 26 |
| 27 private: |
| 28 DISALLOW_COPY_AND_ASSIGN(ChromeSpecialStoragePolicyDelegate); |
| 29 |
| 30 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; |
| 31 }; |
| 32 |
| 33 #endif // CHROME_BROWSER_NET_CHROME_SPECIAL_STORAGE_POLICY_DELEGATE_H_ |
OLD | NEW |