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

Unified Diff: components/password_manager/core/browser/test_affiliation_fetcher_factory.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
« no previous file with comments | « components/password_manager/core/browser/fake_affiliation_fetcher.cc ('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/test_affiliation_fetcher_factory.h
diff --git a/components/password_manager/core/browser/test_affiliation_fetcher_factory.h b/components/password_manager/core/browser/test_affiliation_fetcher_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..e313702e23a623b350ea1a54bc8fc5306fd5ea63
--- /dev/null
+++ b/components/password_manager/core/browser/test_affiliation_fetcher_factory.h
@@ -0,0 +1,39 @@
+// 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_TEST_AFFILIATION_FETCHER_FACTORY_H_
+#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_TEST_AFFILIATION_FETCHER_FACTORY_H_
+
+#include <vector>
+
+namespace net {
+class URLRequestContextGetter;
+} // namespace net
+
+namespace password_manager {
+
+class FacetURI;
+class AffiliationFetcherDelegate;
+
+// Interface for a factory to be used by AffiliationFetcher::Create() in tests
+// to construct instances of test-specific AffiliationFetcher subclasses.
+//
+// The factory is registered with AffiliationFetcher::SetFactoryForTesting().
+class TestAffiliationFetcherFactory {
+ public:
+ // Constructs a fetcher to retrieve affiliations for each facet in |facet_ids|
+ // using the specified |request_context_getter|, and will provide the results
+ // to the |delegate| on the same thread that creates the instance.
+ virtual AffiliationFetcher* CreateInstance(
+ net::URLRequestContextGetter* request_context_getter,
+ const std::vector<FacetURI>& facet_ids,
+ AffiliationFetcherDelegate* delegate) = 0;
+
+ protected:
+ virtual ~TestAffiliationFetcherFactory() {}
+};
+
+} // namespace password_manager
+
+#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_TEST_AFFILIATION_FETCHER_FACTORY_H_
« no previous file with comments | « components/password_manager/core/browser/fake_affiliation_fetcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698