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 WEBKIT_BROWSER_DATABASE_DATABASE_TRACKER_H_ | 5 #ifndef WEBKIT_BROWSER_DATABASE_DATABASE_TRACKER_H_ |
6 #define WEBKIT_BROWSER_DATABASE_DATABASE_TRACKER_H_ | 6 #define WEBKIT_BROWSER_DATABASE_DATABASE_TRACKER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "net/base/completion_callback.h" | 21 #include "net/base/completion_callback.h" |
22 #include "webkit/browser/webkit_storage_browser_export.h" | 22 #include "webkit/browser/webkit_storage_browser_export.h" |
23 #include "webkit/common/database/database_connections.h" | 23 #include "webkit/common/database/database_connections.h" |
24 | 24 |
25 namespace base { | 25 namespace base { |
26 class MessageLoopProxy; | 26 class MessageLoopProxy; |
27 } | 27 } |
28 | 28 |
29 namespace content { | 29 namespace content { |
30 class DatabaseTracker_TestHelper_Test; | 30 class DatabaseTracker_TestHelper_Test; |
| 31 class MockDatabaseTracker; |
31 } | 32 } |
32 | 33 |
33 namespace sql { | 34 namespace sql { |
34 class Connection; | 35 class Connection; |
35 class MetaTable; | 36 class MetaTable; |
36 } | 37 } |
37 | 38 |
38 namespace quota { | 39 namespace quota { |
39 class QuotaManagerProxy; | 40 class QuotaManagerProxy; |
40 class SpecialStoragePolicy; | 41 class SpecialStoragePolicy; |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 | 178 |
178 // Shutdown the database tracker, deleting database files if the tracker is | 179 // Shutdown the database tracker, deleting database files if the tracker is |
179 // used for an incognito profile. | 180 // used for an incognito profile. |
180 void Shutdown(); | 181 void Shutdown(); |
181 // Disables the exit-time deletion of session-only data. | 182 // Disables the exit-time deletion of session-only data. |
182 void SetForceKeepSessionState(); | 183 void SetForceKeepSessionState(); |
183 | 184 |
184 private: | 185 private: |
185 friend class base::RefCountedThreadSafe<DatabaseTracker>; | 186 friend class base::RefCountedThreadSafe<DatabaseTracker>; |
186 friend class content::DatabaseTracker_TestHelper_Test; | 187 friend class content::DatabaseTracker_TestHelper_Test; |
187 friend class MockDatabaseTracker; // for testing | 188 friend class content::MockDatabaseTracker; // for testing |
188 | 189 |
189 typedef std::map<std::string, std::set<base::string16> > DatabaseSet; | 190 typedef std::map<std::string, std::set<base::string16> > DatabaseSet; |
190 typedef std::vector<std::pair<net::CompletionCallback, DatabaseSet> > | 191 typedef std::vector<std::pair<net::CompletionCallback, DatabaseSet> > |
191 PendingDeletionCallbacks; | 192 PendingDeletionCallbacks; |
192 typedef std::map<base::string16, base::PlatformFile> FileHandlesMap; | 193 typedef std::map<base::string16, base::PlatformFile> FileHandlesMap; |
193 typedef std::map<std::string, base::string16> OriginDirectoriesMap; | 194 typedef std::map<std::string, base::string16> OriginDirectoriesMap; |
194 | 195 |
195 class CachedOriginInfo : public OriginInfo { | 196 class CachedOriginInfo : public OriginInfo { |
196 public: | 197 public: |
197 CachedOriginInfo() : OriginInfo(std::string(), 0) {} | 198 CachedOriginInfo() : OriginInfo(std::string(), 0) {} |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 // this map to assign directory names that do not reveal this information. | 311 // this map to assign directory names that do not reveal this information. |
311 OriginDirectoriesMap incognito_origin_directories_; | 312 OriginDirectoriesMap incognito_origin_directories_; |
312 int incognito_origin_directories_generator_; | 313 int incognito_origin_directories_generator_; |
313 | 314 |
314 FRIEND_TEST_ALL_PREFIXES(DatabaseTracker, TestHelper); | 315 FRIEND_TEST_ALL_PREFIXES(DatabaseTracker, TestHelper); |
315 }; | 316 }; |
316 | 317 |
317 } // namespace webkit_database | 318 } // namespace webkit_database |
318 | 319 |
319 #endif // WEBKIT_BROWSER_DATABASE_DATABASE_TRACKER_H_ | 320 #endif // WEBKIT_BROWSER_DATABASE_DATABASE_TRACKER_H_ |
OLD | NEW |