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 | 7 |
| 8 #include <map> |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
11 #include "base/callback.h" | 12 #include "base/callback.h" |
12 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
13 | 14 |
14 namespace content { | 15 namespace content { |
15 | 16 |
16 // This is a ref-counted class that represents a SessionStorageNamespace. | 17 // This is a ref-counted class that represents a SessionStorageNamespace. |
17 // On destruction it ensures that the storage namespace is destroyed. | 18 // On destruction it ensures that the storage namespace is destroyed. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 73 |
73 // Indicates whether this SessionStorageNamespace is an alias of |other|, | 74 // Indicates whether this SessionStorageNamespace is an alias of |other|, |
74 // i.e. whether they point to the same underlying data. | 75 // i.e. whether they point to the same underlying data. |
75 virtual bool IsAliasOf(SessionStorageNamespace* other) = 0; | 76 virtual bool IsAliasOf(SessionStorageNamespace* other) = 0; |
76 | 77 |
77 protected: | 78 protected: |
78 friend class base::RefCountedThreadSafe<SessionStorageNamespace>; | 79 friend class base::RefCountedThreadSafe<SessionStorageNamespace>; |
79 virtual ~SessionStorageNamespace() {} | 80 virtual ~SessionStorageNamespace() {} |
80 }; | 81 }; |
81 | 82 |
| 83 // Used to store mappings of StoragePartition id to SessionStorageNamespace. |
| 84 typedef std::map<std::string, scoped_refptr<SessionStorageNamespace> > |
| 85 SessionStorageNamespaceMap; |
| 86 |
82 } // namespace content | 87 } // namespace content |
83 | 88 |
84 #endif // CONTENT_PUBLIC_BROWSER_SESSION_STORAGE_NAMESPACE_H_ | 89 #endif // CONTENT_PUBLIC_BROWSER_SESSION_STORAGE_NAMESPACE_H_ |
OLD | NEW |