Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3851)

Unified Diff: chrome/browser/extensions/updater/extension_updater.h

Issue 1897293005: Rate limit programmatic update checks for extensions (reland) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: have Get() just return the net::BackoffEntry::Policy directly 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/updater/extension_updater.h
diff --git a/chrome/browser/extensions/updater/extension_updater.h b/chrome/browser/extensions/updater/extension_updater.h
index d2568296e1b6fc520220de2e2b083c9269d51ea7..92851e8c351fb8c2f26e6ec63bc845454399e542 100644
--- a/chrome/browser/extensions/updater/extension_updater.h
+++ b/chrome/browser/extensions/updater/extension_updater.h
@@ -56,7 +56,6 @@ class ExtensionUpdaterTest;
// ....
// updater->Stop();
class ExtensionUpdater : public ExtensionDownloaderDelegate,
- public ExtensionRegistryObserver,
public content::NotificationObserver {
public:
typedef base::Closure FinishedCallback;
@@ -104,10 +103,8 @@ class ExtensionUpdater : public ExtensionDownloaderDelegate,
// already a pending task that has not yet run.
void CheckSoon();
- // Starts an update check for the specified extension soon. If a check
- // is already running, or finished too recently without an update being
- // installed, this method returns false and the check won't be scheduled.
- bool CheckExtensionSoon(const std::string& extension_id,
+ // Starts an update check for the specified extension soon.
+ void CheckExtensionSoon(const std::string& extension_id,
const FinishedCallback& callback);
// Starts an update check right now, instead of waiting for the next
@@ -158,8 +155,6 @@ class ExtensionUpdater : public ExtensionDownloaderDelegate,
std::list<std::string> in_progress_ids_;
};
- struct ThrottleInfo;
-
// Ensure that we have a valid ExtensionDownloader instance referenced by
// |downloader|.
void EnsureDownloaderCreated();
@@ -214,12 +209,6 @@ class ExtensionUpdater : public ExtensionDownloaderDelegate,
const content::NotificationSource& source,
const content::NotificationDetails& details) override;
- // Implementation of ExtensionRegistryObserver.
- void OnExtensionWillBeInstalled(content::BrowserContext* browser_context,
- const Extension* extension,
- bool is_update,
- const std::string& old_name) override;
-
// Send a notification that update checks are starting.
void NotifyStarted();
@@ -256,9 +245,6 @@ class ExtensionUpdater : public ExtensionDownloaderDelegate,
// Observes CRX installs we initiate.
content::NotificationRegistrar registrar_;
- ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
- extension_registry_observer_;
-
// True when a CrxInstaller is doing an install. Used in MaybeUpdateCrxFile()
// to keep more than one install from running at once.
bool crx_install_is_running_;
@@ -269,10 +255,6 @@ class ExtensionUpdater : public ExtensionDownloaderDelegate,
ExtensionCache* extension_cache_;
- // Keeps track of when an extension tried to update itself, so we can throttle
- // checks to prevent too many requests from being made.
- std::map<std::string, ThrottleInfo> throttle_info_;
-
base::WeakPtrFactory<ExtensionUpdater> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(ExtensionUpdater);
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/updater/extension_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698