Chromium Code Reviews| Index: chrome/browser/extensions/install_delayer.h |
| diff --git a/chrome/browser/extensions/install_delayer.h b/chrome/browser/extensions/install_delayer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..dbbe7c76583f54af37e2812296856076bab425c4 |
| --- /dev/null |
| +++ b/chrome/browser/extensions/install_delayer.h |
| @@ -0,0 +1,34 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_EXTENSIONS_INSTALL_DELAYER_H_ |
| +#define CHROME_BROWSER_EXTENSIONS_INSTALL_DELAYER_H_ |
| + |
| +namespace extensions { |
| + |
| +class Extension; |
| + |
| +// An interface that ExtensionService inquires for whether extension installs |
| +// should be delayed and whether to finish/abort delayed installs. |
| +class InstallDelayer { |
|
asargent_no_longer_on_chrome
2016/04/16 00:20:22
naming suggestion: I was thinking perhaps "Install
xiyuan
2016/04/18 20:44:30
Done.
|
| + public: |
| + // Actions for a pending install. |
| + enum Action { |
| + INSTALL, // Proceed to finish the install. |
| + DELAY, // Delay the install. |
| + ABORT // Abort the install. |
| + }; |
| + |
| + virtual ~InstallDelayer() = default; |
| + |
| + // Invoked by ExtensionService to check what to do with a pending install of |
| + // the given extension. |extension| is an unpacked new extension to be |
| + // installed. |install_immediately| is the flag associated with the install. |
| + virtual Action GetDelayedInstallAction(const Extension* extension, |
|
asargent_no_longer_on_chrome
2016/04/16 00:20:22
naming suggestion: consider something shorter like
xiyuan
2016/04/18 20:44:30
Done.
|
| + bool install_immediately) = 0; |
| +}; |
| + |
| +} // namespace extensions |
| + |
| +#endif // CHROME_BROWSER_EXTENSIONS_INSTALL_DELAYER_H_ |