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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <deque> | 10 #include <deque> |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 void DidInitialize(int64_t* temporary_quota_override, | 434 void DidInitialize(int64_t* temporary_quota_override, |
435 int64_t* desired_available_space, | 435 int64_t* desired_available_space, |
436 bool success); | 436 bool success); |
437 void DidGetLRUOrigin(const GURL* origin, | 437 void DidGetLRUOrigin(const GURL* origin, |
438 bool success); | 438 bool success); |
439 void DidGetInitialTemporaryGlobalQuota(base::TimeTicks start_ticks, | 439 void DidGetInitialTemporaryGlobalQuota(base::TimeTicks start_ticks, |
440 QuotaStatusCode status, | 440 QuotaStatusCode status, |
441 int64_t quota_unused); | 441 int64_t quota_unused); |
442 void DidInitializeTemporaryOriginsInfo(bool success); | 442 void DidInitializeTemporaryOriginsInfo(bool success); |
443 void DidGetAvailableSpace(int64_t space); | 443 void DidGetAvailableSpace(int64_t space); |
| 444 void DidCalculateTemporaryPoolSize(const QuotaCallback& callback, |
| 445 int64_t pool_size); |
444 void DidDatabaseWork(bool success); | 446 void DidDatabaseWork(bool success); |
445 | 447 |
446 void DeleteOnCorrectThread() const; | 448 void DeleteOnCorrectThread() const; |
447 | 449 |
448 void PostTaskAndReplyWithResultForDBThread( | 450 void PostTaskAndReplyWithResultForDBThread( |
449 const tracked_objects::Location& from_here, | 451 const tracked_objects::Location& from_here, |
450 const base::Callback<bool(QuotaDatabase*)>& task, | 452 const base::Callback<bool(QuotaDatabase*)>& task, |
451 const base::Callback<void(bool)>& reply); | 453 const base::Callback<void(bool)>& reply); |
452 | 454 |
| 455 static int64_t CalculateTemporaryPoolSize( |
| 456 GetVolumeInfoFn get_vol_info_fn, |
| 457 const base::FilePath& profile_path); |
453 static int64_t CallGetAmountOfFreeDiskSpace( | 458 static int64_t CallGetAmountOfFreeDiskSpace( |
454 GetVolumeInfoFn get_vol_info_fn, | 459 GetVolumeInfoFn get_vol_info_fn, |
455 const base::FilePath& profile_path); | 460 const base::FilePath& profile_path); |
456 static bool GetVolumeInfo(const base::FilePath& path, | 461 static bool GetVolumeInfo(const base::FilePath& path, |
457 uint64_t* available_space, | 462 uint64_t* available_space, |
458 uint64_t* total_size); | 463 uint64_t* total_size); |
459 | 464 |
460 const bool is_incognito_; | 465 const bool is_incognito_; |
461 const base::FilePath profile_path_; | 466 const base::FilePath profile_path_; |
462 | 467 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 | 519 |
515 struct QuotaManagerDeleter { | 520 struct QuotaManagerDeleter { |
516 static void Destruct(const QuotaManager* manager) { | 521 static void Destruct(const QuotaManager* manager) { |
517 manager->DeleteOnCorrectThread(); | 522 manager->DeleteOnCorrectThread(); |
518 } | 523 } |
519 }; | 524 }; |
520 | 525 |
521 } // namespace storage | 526 } // namespace storage |
522 | 527 |
523 #endif // STORAGE_BROWSER_QUOTA_QUOTA_MANAGER_H_ | 528 #endif // STORAGE_BROWSER_QUOTA_QUOTA_MANAGER_H_ |
OLD | NEW |