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. |