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

Side by Side Diff: content/browser/in_process_webkit/dom_storage_area.h

Issue 8929007: Restore sessionStorage when chrome restarts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix: cloning storage areas. Created 8 years, 11 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_AREA_H_ 5 #ifndef CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_AREA_H_
6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_AREA_H_ 6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_AREA_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/hash_tables.h" 9 #include "base/hash_tables.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 21 matching lines...) Expand all
32 const string16& key, const string16& value, 32 const string16& key, const string16& value,
33 WebKit::WebStorageArea::Result* result); 33 WebKit::WebStorageArea::Result* result);
34 NullableString16 RemoveItem(const string16& key); 34 NullableString16 RemoveItem(const string16& key);
35 bool Clear(); 35 bool Clear();
36 void PurgeMemory(); 36 void PurgeMemory();
37 37
38 int64 id() const { return id_; } 38 int64 id() const { return id_; }
39 39
40 DOMStorageNamespace* owner() const { return owner_; } 40 DOMStorageNamespace* owner() const { return owner_; }
41 41
42 void CopyDataTo(DOMStorageArea* other);
43
42 private: 44 private:
43 // Creates the underlying WebStorageArea on demand. 45 // Creates the underlying WebStorageArea on demand.
44 void CreateWebStorageAreaIfNecessary(); 46 void CreateWebStorageAreaIfNecessary();
45 47
46 // The origin this storage area represents. 48 // The origin this storage area represents.
47 string16 origin_; 49 string16 origin_;
48 GURL origin_url_; 50 GURL origin_url_;
49 51
50 // The storage area we wrap. 52 // The storage area we wrap.
51 scoped_ptr<WebKit::WebStorageArea> storage_area_; 53 scoped_ptr<WebKit::WebStorageArea> storage_area_;
(...skipping 14 matching lines...) Expand all
66 struct hash<DOMStorageArea*> { 68 struct hash<DOMStorageArea*> {
67 std::size_t operator()(DOMStorageArea* const& p) const { 69 std::size_t operator()(DOMStorageArea* const& p) const {
68 return reinterpret_cast<std::size_t>(p); 70 return reinterpret_cast<std::size_t>(p);
69 } 71 }
70 }; 72 };
71 73
72 } // namespace __gnu_cxx 74 } // namespace __gnu_cxx
73 #endif 75 #endif
74 76
75 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_AREA_H_ 77 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_AREA_H_
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_types.h ('k') | content/browser/in_process_webkit/dom_storage_area.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698