Chromium Code Reviews| 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 CONTENT_PUBLIC_BROWSER_DOM_STORAGE_CONTEXT_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_DOM_STORAGE_CONTEXT_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_DOM_STORAGE_CONTEXT_H_ | 6 #define CONTENT_PUBLIC_BROWSER_DOM_STORAGE_CONTEXT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "webkit/dom_storage/dom_storage_context.h" | 13 #include "webkit/dom_storage/dom_storage_context.h" |
| 14 | 14 |
| 15 class GURL; | 15 class GURL; |
| 16 | 16 |
| 17 namespace content { | 17 namespace content { |
| 18 | 18 |
| 19 class BrowserContext; | 19 class BrowserContext; |
| 20 class SessionStorageNamespace; | |
| 20 | 21 |
| 21 // Represents the per-BrowserContext Local Storage data. | 22 // Represents the per-BrowserContext Local Storage data. |
| 22 class DOMStorageContext { | 23 class DOMStorageContext { |
| 23 public: | 24 public: |
| 24 typedef base::Callback< | 25 typedef base::Callback< |
| 25 void(const std::vector<dom_storage::DomStorageContext::UsageInfo>&)> | 26 void(const std::vector<dom_storage::DomStorageContext::UsageInfo>&)> |
| 26 GetUsageInfoCallback; | 27 GetUsageInfoCallback; |
| 27 | 28 |
| 28 // Returns a collection of origins using local storage to the given callback. | 29 // Returns a collection of origins using local storage to the given callback. |
| 29 virtual void GetUsageInfo(const GetUsageInfoCallback& callback) = 0; | 30 virtual void GetUsageInfo(const GetUsageInfoCallback& callback) = 0; |
| 30 | 31 |
| 31 // Deletes the local storage data for the given origin. | 32 // Deletes the local storage data for the given origin. |
| 32 virtual void DeleteOrigin(const GURL& origin) = 0; | 33 virtual void DeleteOrigin(const GURL& origin) = 0; |
| 33 | 34 |
| 35 virtual scoped_refptr<SessionStorageNamespace> RecreateSessionStorage( | |
|
michaeln
2012/06/20 04:01:59
a comment about what this method does &| its inten
marja
2012/06/20 16:54:32
Done.
| |
| 36 const std::string& persistent_id) = 0; | |
| 37 | |
| 34 protected: | 38 protected: |
| 35 virtual ~DOMStorageContext() {} | 39 virtual ~DOMStorageContext() {} |
| 36 }; | 40 }; |
| 37 | 41 |
| 38 } // namespace content | 42 } // namespace content |
| 39 | 43 |
| 40 #endif // CONTENT_PUBLIC_BROWSER_DOM_STORAGE_CONTEXT_H_ | 44 #endif // CONTENT_PUBLIC_BROWSER_DOM_STORAGE_CONTEXT_H_ |
| OLD | NEW |