OLD | NEW |
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 #ifndef CONTENT_PUBLIC_BROWSER_SESSION_STORAGE_NAMESPACE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_SESSION_STORAGE_NAMESPACE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_SESSION_STORAGE_NAMESPACE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_SESSION_STORAGE_NAMESPACE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
| 9 #include <string> |
| 10 |
9 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
10 | 12 |
11 namespace content { | 13 namespace content { |
12 | 14 |
13 // This is a ref-counted class that represents a SessionStorageNamespace. | 15 // This is a ref-counted class that represents a SessionStorageNamespace. |
14 // On destruction it ensures that the storage namespace is destroyed. | 16 // On destruction it ensures that the storage namespace is destroyed. |
15 // NOTE: That if we're shutting down, we don't strictly need to do this, but | 17 // NOTE: That if we're shutting down, we don't strictly need to do this, but |
16 // it keeps valgrind happy. | 18 // it keeps valgrind happy. |
17 class SessionStorageNamespace | 19 class SessionStorageNamespace |
18 : public base::RefCountedThreadSafe<SessionStorageNamespace> { | 20 : public base::RefCountedThreadSafe<SessionStorageNamespace> { |
| 21 public: |
| 22 virtual int64 id() const = 0; |
| 23 virtual std::string persistent_id() const = 0; |
19 protected: | 24 protected: |
20 friend class base::RefCountedThreadSafe<SessionStorageNamespace>; | 25 friend class base::RefCountedThreadSafe<SessionStorageNamespace>; |
21 virtual ~SessionStorageNamespace() {} | 26 virtual ~SessionStorageNamespace() {} |
22 }; | 27 }; |
23 | 28 |
24 } // namespace content | 29 } // namespace content |
25 | 30 |
26 #endif // CONTENT_PUBLIC_BROWSER_SESSION_STORAGE_NAMESPACE_H_ | 31 #endif // CONTENT_PUBLIC_BROWSER_SESSION_STORAGE_NAMESPACE_H_ |
OLD | NEW |