OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BROWSER_DOM_STORAGE_SESSION_STORAGE_DATABASE_ADAPTER_H_ | 5 #ifndef CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_DATABASE_ADAPTER_H_ |
6 #define CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_DATABASE_ADAPTER_H_ | 6 #define CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_DATABASE_ADAPTER_H_ |
7 | 7 |
| 8 #include "base/macros.h" |
8 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
9 #include "content/browser/dom_storage/dom_storage_database_adapter.h" | 10 #include "content/browser/dom_storage/dom_storage_database_adapter.h" |
10 #include "url/gurl.h" | 11 #include "url/gurl.h" |
11 | 12 |
12 namespace content { | 13 namespace content { |
13 | 14 |
14 class SessionStorageDatabase; | 15 class SessionStorageDatabase; |
15 | 16 |
16 class SessionStorageDatabaseAdapter : public DOMStorageDatabaseAdapter { | 17 class SessionStorageDatabaseAdapter : public DOMStorageDatabaseAdapter { |
17 public: | 18 public: |
18 SessionStorageDatabaseAdapter(SessionStorageDatabase* db, | 19 SessionStorageDatabaseAdapter(SessionStorageDatabase* db, |
19 const std::string& permanent_namespace_id, | 20 const std::string& permanent_namespace_id, |
20 const GURL& origin); | 21 const GURL& origin); |
21 ~SessionStorageDatabaseAdapter() override; | 22 ~SessionStorageDatabaseAdapter() override; |
22 void ReadAllValues(DOMStorageValuesMap* result) override; | 23 void ReadAllValues(DOMStorageValuesMap* result) override; |
23 bool CommitChanges(bool clear_all_first, | 24 bool CommitChanges(bool clear_all_first, |
24 const DOMStorageValuesMap& changes) override; | 25 const DOMStorageValuesMap& changes) override; |
25 | 26 |
26 private: | 27 private: |
27 scoped_refptr<SessionStorageDatabase> db_; | 28 scoped_refptr<SessionStorageDatabase> db_; |
28 std::string permanent_namespace_id_; | 29 std::string permanent_namespace_id_; |
29 GURL origin_; | 30 GURL origin_; |
30 | 31 |
31 DISALLOW_COPY_AND_ASSIGN(SessionStorageDatabaseAdapter); | 32 DISALLOW_COPY_AND_ASSIGN(SessionStorageDatabaseAdapter); |
32 }; | 33 }; |
33 | 34 |
34 } // namespace content | 35 } // namespace content |
35 | 36 |
36 #endif // CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_DATABASE_ADAPTER_H_ | 37 #endif // CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_DATABASE_ADAPTER_H_ |
OLD | NEW |