Battery Status API: add UMA logging for Linux.
[chromium-blink-merge.git] / content / browser / dom_storage / session_storage_database_adapter.h
blob9db5f173341a676e1614989bf55241692a737437
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_DATABASE_ADAPTER_H_
6 #define CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_DATABASE_ADAPTER_H_
8 #include "base/memory/ref_counted.h"
9 #include "content/browser/dom_storage/dom_storage_database_adapter.h"
10 #include "url/gurl.h"
12 namespace content {
14 class SessionStorageDatabase;
16 class SessionStorageDatabaseAdapter : public DOMStorageDatabaseAdapter {
17 public:
18 SessionStorageDatabaseAdapter(SessionStorageDatabase* db,
19 const std::string& permanent_namespace_id,
20 const GURL& origin);
21 virtual ~SessionStorageDatabaseAdapter();
22 virtual void ReadAllValues(DOMStorageValuesMap* result) OVERRIDE;
23 virtual bool CommitChanges(bool clear_all_first,
24 const DOMStorageValuesMap& changes) OVERRIDE;
25 private:
26 scoped_refptr<SessionStorageDatabase> db_;
27 std::string permanent_namespace_id_;
28 GURL origin_;
30 DISALLOW_COPY_AND_ASSIGN(SessionStorageDatabaseAdapter);
33 } // namespace content
35 #endif // CONTENT_BROWSER_DOM_STORAGE_SESSION_STORAGE_DATABASE_ADAPTER_H_