| 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 WEBKIT_DATABASE_DATABASE_TRACKER_H_ | 5 #ifndef WEBKIT_DATABASE_DATABASE_TRACKER_H_ |
| 6 #define WEBKIT_DATABASE_DATABASE_TRACKER_H_ | 6 #define WEBKIT_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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 : public base::RefCountedThreadSafe<DatabaseTracker> { | 79 : public base::RefCountedThreadSafe<DatabaseTracker> { |
| 80 public: | 80 public: |
| 81 class Observer { | 81 class Observer { |
| 82 public: | 82 public: |
| 83 virtual void OnDatabaseSizeChanged(const string16& origin_identifier, | 83 virtual void OnDatabaseSizeChanged(const string16& origin_identifier, |
| 84 const string16& database_name, | 84 const string16& database_name, |
| 85 int64 database_size) = 0; | 85 int64 database_size) = 0; |
| 86 virtual void OnDatabaseScheduledForDeletion( | 86 virtual void OnDatabaseScheduledForDeletion( |
| 87 const string16& origin_identifier, | 87 const string16& origin_identifier, |
| 88 const string16& database_name) = 0; | 88 const string16& database_name) = 0; |
| 89 |
| 90 protected: |
| 89 virtual ~Observer() {} | 91 virtual ~Observer() {} |
| 90 }; | 92 }; |
| 91 | 93 |
| 92 DatabaseTracker(const FilePath& profile_path, | 94 DatabaseTracker(const FilePath& profile_path, |
| 93 bool is_incognito, | 95 bool is_incognito, |
| 94 quota::SpecialStoragePolicy* special_storage_policy, | 96 quota::SpecialStoragePolicy* special_storage_policy, |
| 95 quota::QuotaManagerProxy* quota_manager_proxy, | 97 quota::QuotaManagerProxy* quota_manager_proxy, |
| 96 base::MessageLoopProxy* db_tracker_thread); | 98 base::MessageLoopProxy* db_tracker_thread); |
| 97 | 99 |
| 98 void DatabaseOpened(const string16& origin_identifier, | 100 void DatabaseOpened(const string16& origin_identifier, |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 // this map to assign directory names that do not reveal this information. | 300 // this map to assign directory names that do not reveal this information. |
| 299 OriginDirectoriesMap incognito_origin_directories_; | 301 OriginDirectoriesMap incognito_origin_directories_; |
| 300 int incognito_origin_directories_generator_; | 302 int incognito_origin_directories_generator_; |
| 301 | 303 |
| 302 FRIEND_TEST_ALL_PREFIXES(DatabaseTracker, TestHelper); | 304 FRIEND_TEST_ALL_PREFIXES(DatabaseTracker, TestHelper); |
| 303 }; | 305 }; |
| 304 | 306 |
| 305 } // namespace webkit_database | 307 } // namespace webkit_database |
| 306 | 308 |
| 307 #endif // WEBKIT_DATABASE_DATABASE_TRACKER_H_ | 309 #endif // WEBKIT_DATABASE_DATABASE_TRACKER_H_ |
| OLD | NEW |