| 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_QUOTA_QUOTA_DATABASE_H_ | 5 #ifndef WEBKIT_QUOTA_QUOTA_DATABASE_H_ |
| 6 #define WEBKIT_QUOTA_QUOTA_DATABASE_H_ | 6 #define WEBKIT_QUOTA_QUOTA_DATABASE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 } | 21 } |
| 22 | 22 |
| 23 class GURL; | 23 class GURL; |
| 24 | 24 |
| 25 namespace quota { | 25 namespace quota { |
| 26 | 26 |
| 27 // All the methods of this class must run on the DB thread. | 27 // All the methods of this class must run on the DB thread. |
| 28 class QuotaDatabase { | 28 class QuotaDatabase { |
| 29 public: | 29 public: |
| 30 explicit QuotaDatabase(const FilePath& path); | 30 explicit QuotaDatabase(const FilePath& path); |
| 31 ~QuotaDatabase(); | 31 virtual ~QuotaDatabase(); |
| 32 | 32 |
| 33 void CloseConnection(); | 33 void CloseConnection(); |
| 34 | 34 |
| 35 bool GetHostQuota(const std::string& host, StorageType type, int64* quota); | 35 bool GetHostQuota(const std::string& host, StorageType type, int64* quota); |
| 36 bool SetHostQuota(const std::string& host, StorageType type, int64 quota); | 36 bool SetHostQuota(const std::string& host, StorageType type, int64 quota); |
| 37 | 37 |
| 38 bool SetOriginLastAccessTime(const GURL& origin, StorageType type, | 38 bool SetOriginLastAccessTime(const GURL& origin, StorageType type, |
| 39 base::Time last_access_time); | 39 base::Time last_access_time); |
| 40 | 40 |
| 41 bool DeleteHostQuota(const std::string& host, StorageType type); | 41 bool DeleteHostQuota(const std::string& host, StorageType type); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 72 FRIEND_TEST_ALL_PREFIXES(QuotaDatabaseTest, HostQuota); | 72 FRIEND_TEST_ALL_PREFIXES(QuotaDatabaseTest, HostQuota); |
| 73 FRIEND_TEST_ALL_PREFIXES(QuotaDatabaseTest, GlobalQuota); | 73 FRIEND_TEST_ALL_PREFIXES(QuotaDatabaseTest, GlobalQuota); |
| 74 FRIEND_TEST_ALL_PREFIXES(QuotaDatabaseTest, OriginLastAccessTimeLRU); | 74 FRIEND_TEST_ALL_PREFIXES(QuotaDatabaseTest, OriginLastAccessTimeLRU); |
| 75 | 75 |
| 76 DISALLOW_COPY_AND_ASSIGN(QuotaDatabase); | 76 DISALLOW_COPY_AND_ASSIGN(QuotaDatabase); |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 } // namespace quota | 79 } // namespace quota |
| 80 | 80 |
| 81 #endif // WEBKIT_QUOTA_QUOTA_DATABASE_H_ | 81 #endif // WEBKIT_QUOTA_QUOTA_DATABASE_H_ |
| OLD | NEW |