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

Unified Diff: components/password_manager/core/browser/affiliation_fetch_throttler_delegate.h

Issue 807503002: Implement throttling logic for fetching affiliation information. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@aff_database
Patch Set: Nit Created 5 years, 11 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/password_manager/core/browser/affiliation_fetch_throttler_delegate.h
diff --git a/components/password_manager/core/browser/affiliation_fetch_throttler_delegate.h b/components/password_manager/core/browser/affiliation_fetch_throttler_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..ac3ee19261fe955728ae4eb2423e2154500cb331
--- /dev/null
+++ b/components/password_manager/core/browser/affiliation_fetch_throttler_delegate.h
@@ -0,0 +1,29 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_AFFILIATION_FETCH_THROTTLER_DELEGATE_H_
+#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_AFFILIATION_FETCH_THROTTLER_DELEGATE_H_
+
+namespace password_manager {
+
+// An interface that users of AffiliationFetchThrottler need to implement to get
+// notified once it is okay to issue the next network request.
+class AffiliationFetchThrottlerDelegate {
+ public:
+ // Will be called once the throttling policy allows issuing a network request,
+ // provided SignalNetworkRequestNeeded() has been called at least once since
+ // the last request.
+ //
+ // The implementation should return whether a request was actually issued in
+ // response to this call. If so, then InformOfNetworkRequestComplete() must be
+ // called once request is complete.
mmenke 2015/01/21 17:18:52 And if not?
engedy 2015/01/23 22:09:43 Done.
+ virtual bool OnCanSendNetworkRequest() = 0;
+
+ protected:
+ virtual ~AffiliationFetchThrottlerDelegate() {}
+};
+
+} // namespace password_manager
+
+#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_AFFILIATION_FETCH_THROTTLER_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698