Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_RENDERER_DOM_STORAGE_LOCAL_STORAGE_NAMESPACE_H_ | 5 #ifndef CONTENT_RENDERER_DOM_STORAGE_LOCAL_STORAGE_NAMESPACE_H_ |
| 6 #define CONTENT_RENDERER_DOM_STORAGE_LOCAL_STORAGE_NAMESPACE_H_ | 6 #define CONTENT_RENDERER_DOM_STORAGE_LOCAL_STORAGE_NAMESPACE_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "third_party/WebKit/public/platform/WebStorageNamespace.h" | 9 #include "third_party/WebKit/public/platform/WebStorageNamespace.h" |
| 10 | 10 |
| 11 namespace content { | 11 namespace content { |
| 12 class StoragePartitionService; | 12 class LocalStorageCachedAreas; |
| 13 | 13 |
| 14 // An in-process implementation of LocalStorage using a LevelDB Mojo service. | |
| 15 class LocalStorageNamespace : public blink::WebStorageNamespace { | 14 class LocalStorageNamespace : public blink::WebStorageNamespace { |
| 16 public: | 15 public: |
| 16 // |local_storage_cached_areas| is guaranteed to outlive this object. | |
| 17 explicit LocalStorageNamespace( | 17 explicit LocalStorageNamespace( |
| 18 StoragePartitionService* storage_partition_service); | 18 LocalStorageCachedAreas* local_storage_cached_areas); |
| 19 ~LocalStorageNamespace() override; | 19 ~LocalStorageNamespace() override; |
| 20 | 20 |
| 21 // blink::WebStorageNamespace: | 21 // blink::WebStorageNamespace: |
| 22 blink::WebStorageArea* createStorageArea( | 22 blink::WebStorageArea* createStorageArea( |
| 23 const blink::WebString& origin) override; | 23 const blink::WebString& origin) override; |
| 24 bool isSameNamespace(const WebStorageNamespace&) const override; | 24 bool isSameNamespace(const WebStorageNamespace&) const override; |
| 25 | 25 |
| 26 private: | 26 private: |
| 27 StoragePartitionService* const storage_partition_service_; | 27 LocalStorageCachedAreas* local_storage_cached_areas_; |
|
dcheng
2016/03/02 18:40:23
Nit: maybe LocalStorageCachedAreas* const if it do
jam
2016/03/02 19:08:19
Done.
| |
| 28 | 28 |
| 29 DISALLOW_COPY_AND_ASSIGN(LocalStorageNamespace); | 29 DISALLOW_COPY_AND_ASSIGN(LocalStorageNamespace); |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 } // namespace content | 32 } // namespace content |
| 33 | 33 |
| 34 #endif // CONTENT_RENDERER_DOM_STORAGE_LOCAL_STORAGE_NAMESPACE_H_ | 34 #endif // CONTENT_RENDERER_DOM_STORAGE_LOCAL_STORAGE_NAMESPACE_H_ |
| OLD | NEW |