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

Unified Diff: components/autofill/core/browser/autofill_common_test.h

Issue 49303005: Parameterize the PrefService that AutofillDownloadManager uses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Response to review Created 7 years, 1 month 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/autofill/core/browser/autofill_common_test.h
diff --git a/components/autofill/core/browser/autofill_common_test.h b/components/autofill/core/browser/autofill_common_test.h
index 8d6a56ff0faca62135a3ed9b0773c79773a4d675..97d53b098fb36529d03b856152a49d209b98f35c 100644
--- a/components/autofill/core/browser/autofill_common_test.h
+++ b/components/autofill/core/browser/autofill_common_test.h
@@ -5,6 +5,10 @@
#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_COMMON_TEST_H_
#define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_COMMON_TEST_H_
+#include "base/memory/scoped_ptr.h"
+
+class PrefService;
+
namespace content {
class BrowserContext;
}
@@ -19,6 +23,13 @@ struct FormFieldData;
// Common utilities shared amongst Autofill tests.
namespace test {
+// Returns a PrefService that can be used for Autofill-related testing in
+// contexts where the PrefService would otherwise have to be constructed
+// manually (e.g., in unit tests within Autofill core code). The returned
+// PrefService has had Autofill preferences registered on its associated
+// registry.
+scoped_ptr<PrefService> PrefServiceForTesting();
+
// Provides a quick way to populate a FormField with c-strings.
void CreateTestFormField(const char* label,
const char* name,

Powered by Google App Engine
This is Rietveld 408576698