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

Side by Side Diff: webkit/dom_storage/dom_storage_context.h

Issue 9429029: Integrate the new DomStorage backend into DRT and test_shell. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 10 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 WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ 5 #ifndef WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_
6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ 6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 10
11 #include "base/atomic_sequence_num.h" 11 #include "base/atomic_sequence_num.h"
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/file_path.h" 13 #include "base/file_path.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/observer_list.h" 15 #include "base/observer_list.h"
16 16
17 class FilePath; 17 class FilePath;
18 class GURL; 18 class GURL;
19 class NullableString16; 19 class NullableString16;
20 class SimpleDomStorageSystem;
20 21
21 namespace base { 22 namespace base {
22 class Time; 23 class Time;
23 } 24 }
24 25
25 namespace quota { 26 namespace quota {
26 class SpecialStoragePolicy; 27 class SpecialStoragePolicy;
27 } 28 }
28 29
29 namespace dom_storage { 30 namespace dom_storage {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 const DomStorageArea* area, 96 const DomStorageArea* area,
96 const string16& key, 97 const string16& key,
97 const string16& old_value, 98 const string16& old_value,
98 const GURL& page_url); 99 const GURL& page_url);
99 void NotifyAreaCleared( 100 void NotifyAreaCleared(
100 const DomStorageArea* area, 101 const DomStorageArea* area,
101 const GURL& page_url); 102 const GURL& page_url);
102 103
103 private: 104 private:
104 friend class DomStorageSession; 105 friend class DomStorageSession;
106 friend class SimpleDomStorageSystem;
105 friend class base::RefCountedThreadSafe<DomStorageContext>; 107 friend class base::RefCountedThreadSafe<DomStorageContext>;
106 typedef std::map<int64, scoped_refptr<DomStorageNamespace> > 108 typedef std::map<int64, scoped_refptr<DomStorageNamespace> >
107 StorageNamespaceMap; 109 StorageNamespaceMap;
108 110
109 ~DomStorageContext(); 111 ~DomStorageContext();
110 112
111 // May be called on any thread. 113 // May be called on any thread.
112 int64 AllocateSessionId() { 114 int64 AllocateSessionId() {
113 return session_id_sequence_.GetNext(); 115 return session_id_sequence_.GetNext();
114 } 116 }
(...skipping 16 matching lines...) Expand all
131 ObserverList<EventObserver> event_observers_; 133 ObserverList<EventObserver> event_observers_;
132 134
133 // We use a 32 bit identifier for per tab storage sessions. 135 // We use a 32 bit identifier for per tab storage sessions.
134 // At a tab per second, this range is large enough for 68 years. 136 // At a tab per second, this range is large enough for 68 years.
135 base::AtomicSequenceNumber session_id_sequence_; 137 base::AtomicSequenceNumber session_id_sequence_;
136 }; 138 };
137 139
138 } // namespace dom_storage 140 } // namespace dom_storage
139 141
140 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ 142 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/dom_storage/dom_storage_host.cc » ('j') | webkit/dom_storage/dom_storage_types.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698