OLD | NEW |
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 CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_INDEXED_DB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_INDEXED_DB_HELPER_H_ |
6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_INDEXED_DB_HELPER_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_INDEXED_DB_HELPER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 bool operator<(const PendingIndexedDBInfo& other) const; | 90 bool operator<(const PendingIndexedDBInfo& other) const; |
91 | 91 |
92 GURL origin; | 92 GURL origin; |
93 base::string16 name; | 93 base::string16 name; |
94 }; | 94 }; |
95 | 95 |
96 explicit CannedBrowsingDataIndexedDBHelper( | 96 explicit CannedBrowsingDataIndexedDBHelper( |
97 content::IndexedDBContext* context); | 97 content::IndexedDBContext* context); |
98 | 98 |
99 // Return a copy of the IndexedDB helper. Only one consumer can use the | |
100 // StartFetching method at a time, so we need to create a copy of the helper | |
101 // every time we instantiate a cookies tree model for it. | |
102 CannedBrowsingDataIndexedDBHelper* Clone(); | |
103 | |
104 // Add a indexed database to the set of canned indexed databases that is | 99 // Add a indexed database to the set of canned indexed databases that is |
105 // returned by this helper. | 100 // returned by this helper. |
106 void AddIndexedDB(const GURL& origin, | 101 void AddIndexedDB(const GURL& origin, |
107 const base::string16& name); | 102 const base::string16& name); |
108 | 103 |
109 // Clear the list of canned indexed databases. | 104 // Clear the list of canned indexed databases. |
110 void Reset(); | 105 void Reset(); |
111 | 106 |
112 // True if no indexed databases are currently stored. | 107 // True if no indexed databases are currently stored. |
113 bool empty() const; | 108 bool empty() const; |
(...skipping 13 matching lines...) Expand all Loading... |
127 | 122 |
128 private: | 123 private: |
129 virtual ~CannedBrowsingDataIndexedDBHelper(); | 124 virtual ~CannedBrowsingDataIndexedDBHelper(); |
130 | 125 |
131 std::set<PendingIndexedDBInfo> pending_indexed_db_info_; | 126 std::set<PendingIndexedDBInfo> pending_indexed_db_info_; |
132 | 127 |
133 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataIndexedDBHelper); | 128 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataIndexedDBHelper); |
134 }; | 129 }; |
135 | 130 |
136 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_INDEXED_DB_HELPER_H_ | 131 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_INDEXED_DB_HELPER_H_ |
OLD | NEW |