Index: net/sqlite/special_storage_policy_delegate.h |
diff --git a/net/sqlite/special_storage_policy_delegate.h b/net/sqlite/special_storage_policy_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..21df8375202907df93d6039335c6d3162ae9ecd4 |
--- /dev/null |
+++ b/net/sqlite/special_storage_policy_delegate.h |
@@ -0,0 +1,34 @@ |
+// 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 NET_SQLITE_SPECIAL_STORAGE_POLICY_DELEGATE_H_ |
+#define NET_SQLITE_SPECIAL_STORAGE_POLICY_DELEGATE_H_ |
+ |
+#include "base/macros.h" |
+ |
+class GURL; |
+ |
+namespace net { |
+ |
+// Interface to determine whether session-only data has to be deleted at the |
+// end of the session. |
+class SpecialStoragePolicyDelegate { |
+ public: |
+ SpecialStoragePolicyDelegate() {} |
+ virtual ~SpecialStoragePolicyDelegate() {} |
+ |
+ // Some origins are only allowed to store session-only data which is deleted |
+ // when the session ends. |
+ virtual bool IsStorageSessionOnly(const GURL& origin) = 0; |
+ |
+ // Returns true if some origins are only allowed session-only storage. |
+ virtual bool HasSessionOnlyOrigins() = 0; |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(SpecialStoragePolicyDelegate); |
+}; |
+ |
+} // namespace net |
+ |
+#endif // NET_SQLITE_SPECIAL_STORAGE_POLICY_DELEGATE_H_ |