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