Only grant permissions to new extensions from sync if they have the expected version
[chromium-blink-merge.git] / components / autofill / core / browser / test_autofill_client.cc
blob3ad7d745d333746a357a834e83ab396f5674304c
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "components/autofill/core/browser/test_autofill_client.h"
7 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
9 namespace autofill {
11 TestAutofillClient::TestAutofillClient()
12 : token_service_(new FakeOAuth2TokenService()),
13 identity_provider_(new FakeIdentityProvider(token_service_.get())),
14 rappor_service_(new rappor::TestRapporService()),
15 is_context_secure_(true) {
17 TestAutofillClient::~TestAutofillClient() {
20 PersonalDataManager* TestAutofillClient::GetPersonalDataManager() {
21 return nullptr;
24 scoped_refptr<AutofillWebDataService> TestAutofillClient::GetDatabase() {
25 return scoped_refptr<AutofillWebDataService>(nullptr);
28 PrefService* TestAutofillClient::GetPrefs() {
29 return prefs_.get();
32 IdentityProvider* TestAutofillClient::GetIdentityProvider() {
33 return identity_provider_.get();
36 rappor::RapporService* TestAutofillClient::GetRapporService() {
37 return rappor_service_.get();
40 void TestAutofillClient::HideRequestAutocompleteDialog() {
43 void TestAutofillClient::ShowAutofillSettings() {
46 void TestAutofillClient::ShowUnmaskPrompt(
47 const CreditCard& card,
48 base::WeakPtr<CardUnmaskDelegate> delegate) {
51 void TestAutofillClient::OnUnmaskVerificationResult(GetRealPanResult result) {
54 void TestAutofillClient::ConfirmSaveCreditCard(
55 const base::Closure& save_card_callback) {
58 bool TestAutofillClient::HasCreditCardScanFeature() {
59 return false;
62 void TestAutofillClient::ScanCreditCard(
63 const CreditCardScanCallback& callback) {
66 void TestAutofillClient::ShowRequestAutocompleteDialog(
67 const FormData& form,
68 content::RenderFrameHost* rfh,
69 const ResultCallback& callback) {
72 void TestAutofillClient::ShowAutofillPopup(
73 const gfx::RectF& element_bounds,
74 base::i18n::TextDirection text_direction,
75 const std::vector<Suggestion>& suggestions,
76 base::WeakPtr<AutofillPopupDelegate> delegate) {
79 void TestAutofillClient::UpdateAutofillPopupDataListValues(
80 const std::vector<base::string16>& values,
81 const std::vector<base::string16>& labels) {
84 void TestAutofillClient::HideAutofillPopup() {
87 bool TestAutofillClient::IsAutocompleteEnabled() {
88 return true;
91 void TestAutofillClient::PropagateAutofillPredictions(
92 content::RenderFrameHost* rfh,
93 const std::vector<autofill::FormStructure*>& forms) {
96 void TestAutofillClient::DidFillOrPreviewField(
97 const base::string16& autofilled_value,
98 const base::string16& profile_full_name) {
101 void TestAutofillClient::OnFirstUserGestureObserved() {
104 void TestAutofillClient::LinkClicked(const GURL& url,
105 WindowOpenDisposition disposition) {
108 bool TestAutofillClient::IsContextSecure(const GURL& form_origin) {
109 return is_context_secure_;
111 } // namespace autofill