| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_INSTALL_DELAYER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_INSTALL_DELAYER_H_ |
| 7 |
| 8 namespace extensions { |
| 9 |
| 10 class Extension; |
| 11 |
| 12 // An interface that ExtensionService inquires for whether extension installs |
| 13 // should be delayed and whether to finish/abort delayed installs. |
| 14 class InstallDelayer { |
| 15 public: |
| 16 // Actions for a pending install. |
| 17 enum Action { |
| 18 INSTALL, // Proceed to finish the install. |
| 19 DELAY, // Delay the install. |
| 20 ABORT // Abort the install. |
| 21 }; |
| 22 |
| 23 // Invoked by ExtensionService to check what to do with a pending install of |
| 24 // the given extension. |extension| is an unpacked new extension to be |
| 25 // installed. |install_immediately| is the flag associated with the install. |
| 26 virtual Action GetDelayedInstallAction(const Extension* extension, |
| 27 bool install_immediately) = 0; |
| 28 |
| 29 protected: |
| 30 virtual ~InstallDelayer() = default; |
| 31 }; |
| 32 |
| 33 } // namespace extensions |
| 34 |
| 35 #endif // CHROME_BROWSER_EXTENSIONS_INSTALL_DELAYER_H_ |
| OLD | NEW |