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

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

Issue 1006813008: Introduce StrategyOnCacheMiss enum instead of |cached_only| boolean. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@aff_integ_final
Patch Set: 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
Index: components/password_manager/core/browser/facet_manager.cc
diff --git a/components/password_manager/core/browser/facet_manager.cc b/components/password_manager/core/browser/facet_manager.cc
index be471c2c1226d5d359f161975ac3b3e2f77a4ae2..3265a655bec4e1148f9d3954ddea095945181e90 100644
--- a/components/password_manager/core/browser/facet_manager.cc
+++ b/components/password_manager/core/browser/facet_manager.cc
@@ -110,7 +110,7 @@ FacetManager::~FacetManager() {
}
void FacetManager::GetAffiliations(
- bool cached_only,
+ StrategyOnCacheMiss cache_miss_strategy,
const AffiliationService::ResultCallback& callback,
const scoped_refptr<base::TaskRunner>& callback_task_runner) {
RequestInfo request_info;
@@ -124,11 +124,11 @@ void FacetManager::GetAffiliations(
}
DCHECK_EQ(affiliation.last_update_time, last_update_time_) << facet_uri_;
ServeRequestWithSuccess(request_info, affiliation.facets);
- } else if (cached_only) {
- ServeRequestWithFailure(request_info);
- } else {
+ } else if (cache_miss_strategy == StrategyOnCacheMiss::FETCH_OVER_NETWORK) {
pending_requests_.push_back(request_info);
backend_->SignalNeedNetworkRequest();
+ } else {
+ ServeRequestWithFailure(request_info);
}
}

Powered by Google App Engine
This is Rietveld 408576698