OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 STORAGE_BROWSER_QUOTA_QUOTA_MANAGER_H_ | 5 #ifndef STORAGE_BROWSER_QUOTA_QUOTA_MANAGER_H_ |
6 #define STORAGE_BROWSER_QUOTA_QUOTA_MANAGER_H_ | 6 #define STORAGE_BROWSER_QUOTA_QUOTA_MANAGER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 void GetHostUsage(const std::string& host, StorageType type, | 217 void GetHostUsage(const std::string& host, StorageType type, |
218 QuotaClient::ID client_id, | 218 QuotaClient::ID client_id, |
219 const UsageCallback& callback); | 219 const UsageCallback& callback); |
220 | 220 |
221 bool IsTrackingHostUsage(StorageType type, QuotaClient::ID client_id) const; | 221 bool IsTrackingHostUsage(StorageType type, QuotaClient::ID client_id) const; |
222 | 222 |
223 void GetStatistics(std::map<std::string, std::string>* statistics); | 223 void GetStatistics(std::map<std::string, std::string>* statistics); |
224 | 224 |
225 bool IsStorageUnlimited(const GURL& origin, StorageType type) const; | 225 bool IsStorageUnlimited(const GURL& origin, StorageType type) const; |
226 | 226 |
| 227 void GetDurability(const GURL& origin, |
| 228 const GetDurabilityCallback& callback); |
| 229 |
227 bool CanQueryDiskSize(const GURL& origin) const { | 230 bool CanQueryDiskSize(const GURL& origin) const { |
228 return special_storage_policy_.get() && | 231 return special_storage_policy_.get() && |
229 special_storage_policy_->CanQueryDiskSize(origin); | 232 special_storage_policy_->CanQueryDiskSize(origin); |
230 } | 233 } |
231 | 234 |
232 virtual void GetOriginsModifiedSince(StorageType type, | 235 virtual void GetOriginsModifiedSince(StorageType type, |
233 base::Time modified_since, | 236 base::Time modified_since, |
234 const GetOriginsCallback& callback); | 237 const GetOriginsCallback& callback); |
235 | 238 |
236 bool ResetUsageTracker(StorageType type); | 239 bool ResetUsageTracker(StorageType type); |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 void DidInitialize(int64* temporary_quota_override, | 386 void DidInitialize(int64* temporary_quota_override, |
384 int64* desired_available_space, | 387 int64* desired_available_space, |
385 bool success); | 388 bool success); |
386 void DidGetLRUOrigin(const GURL* origin, | 389 void DidGetLRUOrigin(const GURL* origin, |
387 bool success); | 390 bool success); |
388 void DidGetInitialTemporaryGlobalQuota(QuotaStatusCode status, | 391 void DidGetInitialTemporaryGlobalQuota(QuotaStatusCode status, |
389 int64 quota_unused); | 392 int64 quota_unused); |
390 void DidInitializeTemporaryOriginsInfo(bool success); | 393 void DidInitializeTemporaryOriginsInfo(bool success); |
391 void DidGetAvailableSpace(int64 space); | 394 void DidGetAvailableSpace(int64 space); |
392 void DidDatabaseWork(bool success); | 395 void DidDatabaseWork(bool success); |
| 396 void DidGetDurability(const GetDurabilityCallback& callback, |
| 397 const bool* durable, |
| 398 bool success); |
393 | 399 |
394 void DeleteOnCorrectThread() const; | 400 void DeleteOnCorrectThread() const; |
395 | 401 |
396 void PostTaskAndReplyWithResultForDBThread( | 402 void PostTaskAndReplyWithResultForDBThread( |
397 const tracked_objects::Location& from_here, | 403 const tracked_objects::Location& from_here, |
398 const base::Callback<bool(QuotaDatabase*)>& task, | 404 const base::Callback<bool(QuotaDatabase*)>& task, |
399 const base::Callback<void(bool)>& reply); | 405 const base::Callback<void(bool)>& reply); |
400 | 406 |
401 const bool is_incognito_; | 407 const bool is_incognito_; |
402 const base::FilePath profile_path_; | 408 const base::FilePath profile_path_; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 | 460 |
455 struct QuotaManagerDeleter { | 461 struct QuotaManagerDeleter { |
456 static void Destruct(const QuotaManager* manager) { | 462 static void Destruct(const QuotaManager* manager) { |
457 manager->DeleteOnCorrectThread(); | 463 manager->DeleteOnCorrectThread(); |
458 } | 464 } |
459 }; | 465 }; |
460 | 466 |
461 } // namespace storage | 467 } // namespace storage |
462 | 468 |
463 #endif // STORAGE_BROWSER_QUOTA_QUOTA_MANAGER_H_ | 469 #endif // STORAGE_BROWSER_QUOTA_QUOTA_MANAGER_H_ |
OLD | NEW |