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

Unified Diff: chrome/browser/extensions/install_gate.h

Issue 1890163004: extensions: Abstract out install delay strategy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for comments in #4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/install_gate.h
diff --git a/chrome/browser/extensions/install_gate.h b/chrome/browser/extensions/install_gate.h
new file mode 100644
index 0000000000000000000000000000000000000000..0980cd87d3b7415a53a3225b1610564c034c25d2
--- /dev/null
+++ b/chrome/browser/extensions/install_gate.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_GATE_H_
+#define CHROME_BROWSER_EXTENSIONS_INSTALL_GATE_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 InstallGate {
+ public:
+ // Actions for a pending install.
+ enum Action {
+ INSTALL, // Proceed to finish the install.
+ DELAY, // Delay the install.
+ ABORT // Abort the install.
+ };
+
+ virtual ~InstallGate() = 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 ShouldDelay(const Extension* extension,
+ bool install_immediately) = 0;
+};
+
+} // namespace extensions
+
+#endif // CHROME_BROWSER_EXTENSIONS_INSTALL_GATE_H_
« no previous file with comments | « chrome/browser/extensions/extension_system_impl.cc ('k') | chrome/browser/extensions/shared_module_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698