OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 CHROME_BROWSER_CHROMEOS_EXTENSIONS_INSTALL_LIMITER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_INSTALL_LIMITER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_INSTALL_LIMITER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_INSTALL_LIMITER_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 void CheckAndRunDeferrredInstalls(); | 63 void CheckAndRunDeferrredInstalls(); |
64 | 64 |
65 // Starts install using passed-in info and observes |installer|'s done | 65 // Starts install using passed-in info and observes |installer|'s done |
66 // notification. | 66 // notification. |
67 void RunInstall(const scoped_refptr<CrxInstaller>& installer, | 67 void RunInstall(const scoped_refptr<CrxInstaller>& installer, |
68 const base::FilePath& path); | 68 const base::FilePath& path); |
69 | 69 |
70 // content::NotificationObserver overrides: | 70 // content::NotificationObserver overrides: |
71 virtual void Observe(int type, | 71 virtual void Observe(int type, |
72 const content::NotificationSource& source, | 72 const content::NotificationSource& source, |
73 const content::NotificationDetails& details) OVERRIDE; | 73 const content::NotificationDetails& details) override; |
74 | 74 |
75 content::NotificationRegistrar registrar_; | 75 content::NotificationRegistrar registrar_; |
76 | 76 |
77 DeferredInstallList deferred_installs_; | 77 DeferredInstallList deferred_installs_; |
78 CrxInstallerSet running_installers_; | 78 CrxInstallerSet running_installers_; |
79 | 79 |
80 // A timer to wait before running deferred big app install. | 80 // A timer to wait before running deferred big app install. |
81 base::OneShotTimer<InstallLimiter> wait_timer_; | 81 base::OneShotTimer<InstallLimiter> wait_timer_; |
82 | 82 |
83 bool disabled_for_test_; | 83 bool disabled_for_test_; |
84 | 84 |
85 DISALLOW_COPY_AND_ASSIGN(InstallLimiter); | 85 DISALLOW_COPY_AND_ASSIGN(InstallLimiter); |
86 }; | 86 }; |
87 | 87 |
88 } // namespace extensions | 88 } // namespace extensions |
89 | 89 |
90 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_INSTALL_LIMITER_H_ | 90 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_INSTALL_LIMITER_H_ |
OLD | NEW |