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

Unified Diff: chrome/browser/extensions/update_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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/update_install_delayer.h
diff --git a/chrome/browser/extensions/update_install_delayer.h b/chrome/browser/extensions/update_install_delayer.h
new file mode 100644
index 0000000000000000000000000000000000000000..93c52f58f57b916515706504581fd389c57d1743
--- /dev/null
+++ b/chrome/browser/extensions/update_install_delayer.h
@@ -0,0 +1,33 @@
+// 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_UPDATE_INSTALL_DELAYER_H_
+#define CHROME_BROWSER_EXTENSIONS_UPDATE_INSTALL_DELAYER_H_
+
+#include "base/macros.h"
+#include "chrome/browser/extensions/install_delayer.h"
+
+class ExtensionService;
+
+namespace extensions {
+
+// Delays an extension update if the old version is not idle.
+class UpdateInstallDelayer : public InstallDelayer {
+ public:
+ explicit UpdateInstallDelayer(ExtensionService* service);
+
+ // InstallDelayer:
+ Action GetDelayedInstallAction(const Extension* extension,
+ bool install_immediately) override;
+
+ private:
+ // Not owned.
+ ExtensionService* const service_;
+
+ DISALLOW_COPY_AND_ASSIGN(UpdateInstallDelayer);
+};
+
+} // namespace extensions
+
+#endif // CHROME_BROWSER_EXTENSIONS_UPDATE_INSTALL_DELAYER_H_

Powered by Google App Engine
This is Rietveld 408576698