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

Unified Diff: components/autofill/browser/autofill_common_test.cc

Issue 17465003: Fix most tests in //components/autofill/content to not depend on //chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compilation issue in interactive_ui_tests. Created 7 years, 6 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/autofill/browser/autofill_common_test.cc
diff --git a/components/autofill/browser/autofill_common_test.cc b/components/autofill/browser/autofill_common_test.cc
index cd33530a34bb4c02aa81a135411ebb296170aac6..03e1bfabe60d584b9960ffdca46ea1a5c60f3273 100644
--- a/components/autofill/browser/autofill_common_test.cc
+++ b/components/autofill/browser/autofill_common_test.cc
@@ -7,13 +7,13 @@
#include "base/guid.h"
#include "base/prefs/pref_service.h"
#include "base/strings/utf_string_conversions.h"
-#include "chrome/browser/profiles/profile.h"
#include "components/autofill/browser/autofill_profile.h"
#include "components/autofill/browser/credit_card.h"
#include "components/autofill/core/common/autofill_pref_names.h"
#include "components/autofill/core/common/form_field_data.h"
#include "components/user_prefs/user_prefs.h"
#include "components/webdata/encryptor/encryptor.h"
+#include "content/public/browser/browser_context.h"
namespace autofill {
namespace test {
@@ -142,7 +142,7 @@ void SetCreditCardInfo(CreditCard* credit_card,
check_and_set(credit_card, CREDIT_CARD_EXP_4_DIGIT_YEAR, expiration_year);
}
-void DisableSystemServices(Profile* profile) {
+void DisableSystemServices(content::BrowserContext* browser_context) {
// Use a mock Keychain rather than the OS one to store credit card data.
#if defined(OS_MACOSX)
Encryptor::UseMockKeychain(true);
@@ -150,8 +150,8 @@ void DisableSystemServices(Profile* profile) {
// Disable auxiliary profiles for unit testing. These reach out to system
// services on the Mac.
- if (profile) {
- user_prefs::UserPrefs::Get(profile)->SetBoolean(
+ if (browser_context) {
+ user_prefs::UserPrefs::Get(browser_context)->SetBoolean(
prefs::kAutofillAuxiliaryProfilesEnabled, false);
}
}

Powered by Google App Engine
This is Rietveld 408576698