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

Unified Diff: components/password_manager/core/browser/fake_affiliation_api.cc

Issue 1008373003: Integrate throttling logic into AffiliationBackend. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comment. Created 5 years, 9 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 | « components/password_manager/core/browser/fake_affiliation_api.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/password_manager/core/browser/fake_affiliation_api.cc
diff --git a/components/password_manager/core/browser/fake_affiliation_api.cc b/components/password_manager/core/browser/fake_affiliation_api.cc
index 38e15ad3078828050d6f4f24b771461e7ed18c21..7c398964de5a2133270950d94ee4fb09b7a58151 100644
--- a/components/password_manager/core/browser/fake_affiliation_api.cc
+++ b/components/password_manager/core/browser/fake_affiliation_api.cc
@@ -60,6 +60,14 @@ void ScopedFakeAffiliationAPI::ServeNextRequest() {
fetcher->SimulateSuccess(fake_response.Pass());
}
+void ScopedFakeAffiliationAPI::FailNextRequest() {
+ if (!fake_fetcher_factory_.has_pending_fetchers())
+ return;
+
+ FakeAffiliationFetcher* fetcher = fake_fetcher_factory_.PopNextFetcher();
+ fetcher->SimulateFailure();
+}
+
void ScopedFakeAffiliationAPI::IgnoreNextRequest() {
if (!fake_fetcher_factory_.has_pending_fetchers())
return;
« no previous file with comments | « components/password_manager/core/browser/fake_affiliation_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698