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

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

Issue 10447117: Unwire the clear on exit preference from the storage systems. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 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 #include <vector> 10 #include <vector>
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 void GetUsageInfo(std::vector<UsageInfo>* infos, bool include_file_info); 110 void GetUsageInfo(std::vector<UsageInfo>* infos, bool include_file_info);
111 void DeleteOrigin(const GURL& origin); 111 void DeleteOrigin(const GURL& origin);
112 void DeleteDataModifiedSince(const base::Time& cutoff); 112 void DeleteDataModifiedSince(const base::Time& cutoff);
113 void PurgeMemory(); 113 void PurgeMemory();
114 114
115 // Used by content settings to alter the behavior around 115 // Used by content settings to alter the behavior around
116 // what data to keep and what data to discard at shutdown. 116 // what data to keep and what data to discard at shutdown.
117 // The policy is not so straight forward to describe, see 117 // The policy is not so straight forward to describe, see
118 // the implementation for details. 118 // the implementation for details.
119 void SetClearLocalState(bool clear_local_state) {
120 clear_local_state_ = clear_local_state;
121 }
122 void SaveSessionState() { 119 void SaveSessionState() {
123 save_session_state_ = true; 120 save_session_state_ = true;
124 } 121 }
125 122
126 // Called when the owning BrowserContext is ending. 123 // Called when the owning BrowserContext is ending.
127 // Schedules the commit of any unsaved changes and will delete 124 // Schedules the commit of any unsaved changes and will delete
128 // and keep data on disk per the content settings and special storage 125 // and keep data on disk per the content settings and special storage
129 // policies. Contained areas and namespaces will stop functioning after 126 // policies. Contained areas and namespaces will stop functioning after
130 // this method has been called. 127 // this method has been called.
131 void Shutdown(); 128 void Shutdown();
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 scoped_refptr<DomStorageTaskRunner> task_runner_; 181 scoped_refptr<DomStorageTaskRunner> task_runner_;
185 182
186 // List of objects observing local storage events. 183 // List of objects observing local storage events.
187 ObserverList<EventObserver> event_observers_; 184 ObserverList<EventObserver> event_observers_;
188 185
189 // We use a 32 bit identifier for per tab storage sessions. 186 // We use a 32 bit identifier for per tab storage sessions.
190 // At a tab per second, this range is large enough for 68 years. 187 // At a tab per second, this range is large enough for 68 years.
191 base::AtomicSequenceNumber session_id_sequence_; 188 base::AtomicSequenceNumber session_id_sequence_;
192 189
193 bool is_shutdown_; 190 bool is_shutdown_;
194 bool clear_local_state_;
195 bool save_session_state_; 191 bool save_session_state_;
196 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; 192 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_;
197 }; 193 };
198 194
199 } // namespace dom_storage 195 } // namespace dom_storage
200 196
201 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_ 197 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698