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

Unified Diff: components/safe_browsing_db/v4_update_protocol_manager.h

Issue 1954393002: Initialize and reset V4LocalDBManager. Instantiate V4Stores. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v4_01_db_realz
Patch Set: CR feedback Created 4 years, 7 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: components/safe_browsing_db/v4_update_protocol_manager.h
diff --git a/components/safe_browsing_db/v4_update_protocol_manager.h b/components/safe_browsing_db/v4_update_protocol_manager.h
index 4b924a85fe5a80af2e685cdcb5852af1240768a5..92be60676f5990f9f83d7b5dfbaf7b5065d5425d 100644
--- a/components/safe_browsing_db/v4_update_protocol_manager.h
+++ b/components/safe_browsing_db/v4_update_protocol_manager.h
@@ -68,6 +68,9 @@ class V4UpdateProtocolManager : public net::URLFetcherDelegate,
// net::URLFetcherDelegate interface.
void OnURLFetchComplete(const net::URLFetcher* source) override;
+ // Schedule the next update without backoff.
+ void ScheduleNextUpdate();
+
protected:
// Constructs a V4UpdateProtocolManager that issues network requests using
// |request_context_getter|.
@@ -124,8 +127,8 @@ class V4UpdateProtocolManager : public net::URLFetcherDelegate,
// Returns whether another update is currently scheduled.
bool IsUpdateScheduled() const;
- // Schedule the next update, considering whether we are in backoff.
- void ScheduleNextUpdate(bool back_off);
+ // Schedule the next update with backoff specified.
+ void ScheduleNextUpdateWithBackoff(bool back_off);
// Schedule the next update, after the given interval.
void ScheduleNextUpdateAfterInterval(base::TimeDelta interval);
@@ -165,7 +168,7 @@ class V4UpdateProtocolManager : public net::URLFetcherDelegate,
int url_fetcher_id_;
// The callback that's called when GetUpdates completes.
- V4UpdateCallback callback_;
+ V4UpdateCallback update_callback_;
// The pending update request. The request must be canceled when the object is
// destroyed.
@@ -174,6 +177,8 @@ class V4UpdateProtocolManager : public net::URLFetcherDelegate,
// Timer to setup the next update request.
base::OneShotTimer update_timer_;
+ base::Time last_response_time_;
+
DISALLOW_COPY_AND_ASSIGN(V4UpdateProtocolManager);
};

Powered by Google App Engine
This is Rietveld 408576698