| 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 WEBKIT_BROWSER_DOM_STORAGE_SESSION_STORAGE_DATABASE_ADAPTER_H_ | 5 #ifndef WEBKIT_BROWSER_DOM_STORAGE_SESSION_STORAGE_DATABASE_ADAPTER_H_ |
| 6 #define WEBKIT_BROWSER_DOM_STORAGE_SESSION_STORAGE_DATABASE_ADAPTER_H_ | 6 #define WEBKIT_BROWSER_DOM_STORAGE_SESSION_STORAGE_DATABASE_ADAPTER_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "googleurl/src/gurl.h" | 9 #include "url/gurl.h" |
| 10 #include "webkit/browser/dom_storage/dom_storage_database_adapter.h" | 10 #include "webkit/browser/dom_storage/dom_storage_database_adapter.h" |
| 11 | 11 |
| 12 namespace dom_storage { | 12 namespace dom_storage { |
| 13 | 13 |
| 14 class SessionStorageDatabase; | 14 class SessionStorageDatabase; |
| 15 | 15 |
| 16 class SessionStorageDatabaseAdapter : public DomStorageDatabaseAdapter { | 16 class SessionStorageDatabaseAdapter : public DomStorageDatabaseAdapter { |
| 17 public: | 17 public: |
| 18 SessionStorageDatabaseAdapter(SessionStorageDatabase* db, | 18 SessionStorageDatabaseAdapter(SessionStorageDatabase* db, |
| 19 const std::string& permanent_namespace_id, | 19 const std::string& permanent_namespace_id, |
| 20 const GURL& origin); | 20 const GURL& origin); |
| 21 virtual ~SessionStorageDatabaseAdapter(); | 21 virtual ~SessionStorageDatabaseAdapter(); |
| 22 virtual void ReadAllValues(ValuesMap* result) OVERRIDE; | 22 virtual void ReadAllValues(ValuesMap* result) OVERRIDE; |
| 23 virtual bool CommitChanges(bool clear_all_first, | 23 virtual bool CommitChanges(bool clear_all_first, |
| 24 const ValuesMap& changes) OVERRIDE; | 24 const ValuesMap& changes) OVERRIDE; |
| 25 private: | 25 private: |
| 26 scoped_refptr<SessionStorageDatabase> db_; | 26 scoped_refptr<SessionStorageDatabase> db_; |
| 27 std::string permanent_namespace_id_; | 27 std::string permanent_namespace_id_; |
| 28 GURL origin_; | 28 GURL origin_; |
| 29 | 29 |
| 30 DISALLOW_COPY_AND_ASSIGN(SessionStorageDatabaseAdapter); | 30 DISALLOW_COPY_AND_ASSIGN(SessionStorageDatabaseAdapter); |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 } // namespace dom_storage | 33 } // namespace dom_storage |
| 34 | 34 |
| 35 #endif // WEBKIT_BROWSER_DOM_STORAGE_SESSION_STORAGE_DATABASE_ADAPTER_H_ | 35 #endif // WEBKIT_BROWSER_DOM_STORAGE_SESSION_STORAGE_DATABASE_ADAPTER_H_ |
| OLD | NEW |