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

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

Issue 866733002: Add FakeAffiliationFetcher and factory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missing file. 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_fetcher.h
diff --git a/components/password_manager/core/browser/affiliation_fetcher.h b/components/password_manager/core/browser/affiliation_fetcher.h
index 5bda532ccb3464a051141f522c87459cd85f2cff..408a34810a9ef4286ac27091149c72072bb8ec6e 100644
--- a/components/password_manager/core/browser/affiliation_fetcher.h
+++ b/components/password_manager/core/browser/affiliation_fetcher.h
@@ -21,6 +21,8 @@ class URLRequestContextGetter;
namespace password_manager {
+class TestAffiliationFetcherFactory;
+
// Fetches authoritative information regarding which facets are affiliated with
// each other, that is, which facets belong to the same logical application.
// See affiliation_utils.h for a definition of what this means.
@@ -39,6 +41,13 @@ class AffiliationFetcher : net::URLFetcherDelegate {
const std::vector<FacetURI>& facet_uris,
AffiliationFetcherDelegate* delegate);
+ // Sets the |factory| to be used by Create() to construct AffiliationFetcher
+ // instances. To be used only for testing.
+ //
+ // The caller must ensure that the |factory| outlives all potential Create()
+ // calls. The caller may pass in NULL to resume using the default factory.
+ static void SetFactoryForTesting(TestAffiliationFetcherFactory* factory);
+
// Actually starts the request, and will call the delegate with the results on
// the same thread when done. If |this| is destroyed before completion, the
// in-flight request is cancelled, and the delegate will not be called.
« no previous file with comments | « components/password_manager/core/browser/BUILD.gn ('k') | components/password_manager/core/browser/affiliation_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698