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

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: Changes per atwilson@'s comments. 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..76c374bf66b0ec286d9e2542e4770be32e979f10 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 component extensions that have attempted to reload with a
+ // BackoffEntry keeping track of retry timing.
+ typedef std::map<extensions::ExtensionId, std::unique_ptr<net::BackoffEntry>>
+ ExtensionBackoffEntryMap;
+ ExtensionBackoffEntryMap backoff_map_;
+
ScopedObserver<extensions::ExtensionRegistry,
extensions::ExtensionRegistryObserver>
extension_registry_observer_;

Powered by Google App Engine
This is Rietveld 408576698