Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: content/public/browser/dom_storage_context.h

Issue 10572015: Session restore: Store and restore persistent IDs for sessionStorage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test fix Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 // Creates a SessionStorageNamespace with the given |persistent_id|. Used
36 // after tabs are restored by session restore. When created, the
37 // SessionStorageNamespace with the correct |persistent_id| will be
38 // associated with the persisted sessionStorage data.
39 virtual scoped_refptr<SessionStorageNamespace> RecreateSessionStorage(
40 const std::string& persistent_id) = 0;
41
34 protected: 42 protected:
35 virtual ~DOMStorageContext() {} 43 virtual ~DOMStorageContext() {}
36 }; 44 };
37 45
38 } // namespace content 46 } // namespace content
39 47
40 #endif // CONTENT_PUBLIC_BROWSER_DOM_STORAGE_CONTEXT_H_ 48 #endif // CONTENT_PUBLIC_BROWSER_DOM_STORAGE_CONTEXT_H_
OLDNEW
« no previous file with comments | « content/browser/dom_storage/session_storage_namespace_impl.cc ('k') | content/public/browser/session_storage_namespace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698