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

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

Issue 2310463002: Update component extension reload backoff logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes per wez@'s comment. Created 4 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/background/background_contents_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 76c374bf66b0ec286d9e2542e4770be32e979f10..69cbaea77baf4961a9aed3231006404602cf36bf 100644
--- a/chrome/browser/background/background_contents_service.h
+++ b/chrome/browser/background/background_contents_service.h
@@ -14,6 +14,7 @@
#include "base/gtest_prod_util.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
#include "base/scoped_observer.h"
#include "chrome/browser/background/background_contents.h"
#include "components/keyed_service/core/keyed_service.h"
@@ -216,6 +217,11 @@ class BackgroundContentsService : private content::NotificationObserver,
// set of background apps as new background contents are opened/closed).
void SendChangeNotification(Profile* profile);
+ // Checks whether there has been additional |extension_id| failures. If not,
+ // delete the BackoffEntry corresponding to |extension_id|, if exists.
+ void MaybeClearBackoffEntry(const std::string extension_id,
+ int expected_failure_count);
+
// Delay (in ms) before restarting a force-installed extension that crashed.
static int restart_delay_in_ms_;
@@ -243,13 +249,15 @@ class BackgroundContentsService : private content::NotificationObserver,
// 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_;
+ ComponentExtensionBackoffEntryMap;
+ ComponentExtensionBackoffEntryMap component_backoff_map_;
ScopedObserver<extensions::ExtensionRegistry,
extensions::ExtensionRegistryObserver>
extension_registry_observer_;
+ base::WeakPtrFactory<BackgroundContentsService> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(BackgroundContentsService);
};
« no previous file with comments | « no previous file | chrome/browser/background/background_contents_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698