OLD | NEW |
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_WEBKIT_CONTEXT_H_ | 5 #ifndef CONTENT_BROWSER_IN_PROCESS_WEBKIT_WEBKIT_CONTEXT_H_ |
6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_WEBKIT_CONTEXT_H_ | 6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_WEBKIT_CONTEXT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // last modified on or after the following time. | 70 // last modified on or after the following time. |
71 void DeleteDataModifiedSince(const base::Time& cutoff); | 71 void DeleteDataModifiedSince(const base::Time& cutoff); |
72 | 72 |
73 // Delete the session storage namespace associated with this id. Can be | 73 // Delete the session storage namespace associated with this id. Can be |
74 // called from any thread. | 74 // called from any thread. |
75 void DeleteSessionStorageNamespace(int64 session_storage_namespace_id); | 75 void DeleteSessionStorageNamespace(int64 session_storage_namespace_id); |
76 | 76 |
77 // Tells all children to not do delete data when destructed. | 77 // Tells all children to not do delete data when destructed. |
78 void SaveSessionState(); | 78 void SaveSessionState(); |
79 | 79 |
| 80 // Tells DOMStorageContext to delete all session storages except the ones in |
| 81 // |needed_session_storages|. |
| 82 void DeleteUnneededSessionStorages( |
| 83 const std::set<std::string>& needed_session_storages); |
| 84 |
80 private: | 85 private: |
81 friend class base::RefCountedThreadSafe<WebKitContext>; | 86 friend class base::RefCountedThreadSafe<WebKitContext>; |
82 virtual ~WebKitContext(); | 87 virtual ~WebKitContext(); |
83 | 88 |
84 // Copies of browser context data that can be accessed on any thread. | 89 // Copies of browser context data that can be accessed on any thread. |
85 const FilePath data_path_; | 90 const FilePath data_path_; |
86 const bool is_incognito_; | 91 const bool is_incognito_; |
87 | 92 |
88 // True if the destructors of context objects should delete their files. | 93 // True if the destructors of context objects should delete their files. |
89 bool clear_local_state_on_exit_; | 94 bool clear_local_state_on_exit_; |
90 | 95 |
91 scoped_ptr<DOMStorageContext> dom_storage_context_; | 96 scoped_ptr<DOMStorageContext> dom_storage_context_; |
92 scoped_refptr<IndexedDBContext> indexed_db_context_; | 97 scoped_refptr<IndexedDBContext> indexed_db_context_; |
93 | 98 |
94 DISALLOW_IMPLICIT_CONSTRUCTORS(WebKitContext); | 99 DISALLOW_IMPLICIT_CONSTRUCTORS(WebKitContext); |
95 }; | 100 }; |
96 | 101 |
97 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_WEBKIT_CONTEXT_H_ | 102 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_WEBKIT_CONTEXT_H_ |
OLD | NEW |