Index: chrome/browser/net/chrome_special_storage_policy_delegate.h |
diff --git a/chrome/browser/net/chrome_special_storage_policy_delegate.h b/chrome/browser/net/chrome_special_storage_policy_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..23944920cd0b782eb3cb20975d04843e14b90254 |
--- /dev/null |
+++ b/chrome/browser/net/chrome_special_storage_policy_delegate.h |
@@ -0,0 +1,33 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_NET_CHROME_SPECIAL_STORAGE_POLICY_DELEGATE_H_ |
+#define CHROME_BROWSER_NET_CHROME_SPECIAL_STORAGE_POLICY_DELEGATE_H_ |
+ |
+#include "net/sqlite/special_storage_policy_delegate.h" |
+#include "webkit/browser/quota/special_storage_policy.h" |
+ |
+// Interface to determine whether session-only data has to be deleted at the |
+// end of the session. |
+class ChromeSpecialStoragePolicyDelegate |
+ : public net::SpecialStoragePolicyDelegate { |
+ public: |
+ ChromeSpecialStoragePolicyDelegate( |
+ quota::SpecialStoragePolicy* special_storage_policy); |
+ virtual ~ChromeSpecialStoragePolicyDelegate(); |
+ |
+ // Some origins are only allowed to store session-only data which is deleted |
+ // when the session ends. |
+ virtual bool IsStorageSessionOnly(const GURL& origin) OVERRIDE; |
+ |
+ // Returns true if some origins are only allowed session-only storage. |
+ virtual bool HasSessionOnlyOrigins() OVERRIDE; |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(ChromeSpecialStoragePolicyDelegate); |
+ |
+ scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; |
+}; |
+ |
+#endif // CHROME_BROWSER_NET_CHROME_SPECIAL_STORAGE_POLICY_DELEGATE_H_ |