Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(587)

Side by Side Diff: storage/browser/quota/quota_manager.h

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 445
446 int64 desired_available_space_; 446 int64 desired_available_space_;
447 447
448 // Map from origin to count. 448 // Map from origin to count.
449 std::map<GURL, int> origins_in_use_; 449 std::map<GURL, int> origins_in_use_;
450 // Map from origin to error count. 450 // Map from origin to error count.
451 std::map<GURL, int> origins_in_error_; 451 std::map<GURL, int> origins_in_error_;
452 452
453 scoped_refptr<SpecialStoragePolicy> special_storage_policy_; 453 scoped_refptr<SpecialStoragePolicy> special_storage_policy_;
454 454
455 base::RepeatingTimer<QuotaManager> histogram_timer_; 455 base::RepeatingTimer histogram_timer_;
456 456
457 // Pointer to the function used to get the available disk space. This is 457 // Pointer to the function used to get the available disk space. This is
458 // overwritten by QuotaManagerTest in order to attain a deterministic reported 458 // overwritten by QuotaManagerTest in order to attain a deterministic reported
459 // value. The default value points to base::SysInfo::AmountOfFreeDiskSpace. 459 // value. The default value points to base::SysInfo::AmountOfFreeDiskSpace.
460 GetAvailableDiskSpaceFn get_disk_space_fn_; 460 GetAvailableDiskSpaceFn get_disk_space_fn_;
461 461
462 scoped_ptr<StorageMonitor> storage_monitor_; 462 scoped_ptr<StorageMonitor> storage_monitor_;
463 463
464 base::WeakPtrFactory<QuotaManager> weak_factory_; 464 base::WeakPtrFactory<QuotaManager> weak_factory_;
465 465
466 DISALLOW_COPY_AND_ASSIGN(QuotaManager); 466 DISALLOW_COPY_AND_ASSIGN(QuotaManager);
467 }; 467 };
468 468
469 struct QuotaManagerDeleter { 469 struct QuotaManagerDeleter {
470 static void Destruct(const QuotaManager* manager) { 470 static void Destruct(const QuotaManager* manager) {
471 manager->DeleteOnCorrectThread(); 471 manager->DeleteOnCorrectThread();
472 } 472 }
473 }; 473 };
474 474
475 } // namespace storage 475 } // namespace storage
476 476
477 #endif // STORAGE_BROWSER_QUOTA_QUOTA_MANAGER_H_ 477 #endif // STORAGE_BROWSER_QUOTA_QUOTA_MANAGER_H_
OLDNEW
« no previous file with comments | « storage/browser/quota/quota_database.h ('k') | storage/browser/quota/quota_temporary_storage_evictor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698