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

Unified Diff: chrome/browser/background/background_contents_service.h

Issue 2281323002: Use exponential backoff for component extension reloads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/background/background_contents_service.h
diff --git a/chrome/browser/background/background_contents_service.h b/chrome/browser/background/background_contents_service.h
index 1d66057db5ffdb89433d685c60fec5828fdad90c..6c3a423dfce6597860ee9b1a5d88b8a693b74fa7 100644
--- a/chrome/browser/background/background_contents_service.h
+++ b/chrome/browser/background/background_contents_service.h
@@ -21,6 +21,7 @@
#include "content/public/browser/notification_registrar.h"
#include "content/public/common/window_container_type.h"
#include "extensions/browser/extension_registry_observer.h"
+#include "net/base/backoff_entry.h"
#include "ui/base/window_open_disposition.h"
#include "url/gurl.h"
@@ -239,6 +240,12 @@ class BackgroundContentsService : private content::NotificationObserver,
BackgroundContentsMap;
BackgroundContentsMap contents_map_;
+ // Map associating non-policy, component extensions that have been reloaded
+ // with a BackoffEntry keeping track of retry timing.
+ typedef std::map<extensions::ExtensionId, net::BackoffEntry*>
+ ExtensionBackoffEntryMap;
+ ExtensionBackoffEntryMap backoff_map_;
+
ScopedObserver<extensions::ExtensionRegistry,
extensions::ExtensionRegistryObserver>
extension_registry_observer_;

Powered by Google App Engine
This is Rietveld 408576698