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

Side by Side Diff: chrome/browser/extensions/install_delayer.h

Issue 1890163004: extensions: Abstract out install delay strategy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win,mac compile Created 4 years, 8 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
(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 {
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.
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 virtual ~InstallDelayer() = default;
24
25 // Invoked by ExtensionService to check what to do with a pending install of
26 // the given extension. |extension| is an unpacked new extension to be
27 // installed. |install_immediately| is the flag associated with the install.
28 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.
29 bool install_immediately) = 0;
30 };
31
32 } // namespace extensions
33
34 #endif // CHROME_BROWSER_EXTENSIONS_INSTALL_DELAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698