| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/autofill/core/browser/test_autofill_client.h" | 5 #include "components/autofill/core/browser/test_autofill_client.h" |
| 6 | 6 |
| 7 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 7 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
| 8 | 8 |
| 9 namespace autofill { | 9 namespace autofill { |
| 10 | 10 |
| 11 TestAutofillClient::TestAutofillClient() | 11 TestAutofillClient::TestAutofillClient() |
| 12 : token_service_(new FakeOAuth2TokenService()), | 12 : token_service_(new FakeOAuth2TokenService()), |
| 13 identity_provider_(new FakeIdentityProvider(token_service_.get())), | 13 identity_provider_(new FakeIdentityProvider(token_service_.get())), |
| 14 rappor_service_(new rappor::TestRapporService()), | 14 rappor_service_(new rappor::TestRapporService()) {} |
| 15 is_context_secure_(true) { | |
| 16 } | |
| 17 | 15 |
| 18 TestAutofillClient::~TestAutofillClient() { | 16 TestAutofillClient::~TestAutofillClient() { |
| 19 } | 17 } |
| 20 | 18 |
| 21 PersonalDataManager* TestAutofillClient::GetPersonalDataManager() { | 19 PersonalDataManager* TestAutofillClient::GetPersonalDataManager() { |
| 22 return nullptr; | 20 return nullptr; |
| 23 } | 21 } |
| 24 | 22 |
| 25 scoped_refptr<AutofillWebDataService> TestAutofillClient::GetDatabase() { | 23 scoped_refptr<AutofillWebDataService> TestAutofillClient::GetDatabase() { |
| 26 return scoped_refptr<AutofillWebDataService>(nullptr); | 24 return scoped_refptr<AutofillWebDataService>(nullptr); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 109 |
| 112 void TestAutofillClient::DidFillOrPreviewField( | 110 void TestAutofillClient::DidFillOrPreviewField( |
| 113 const base::string16& autofilled_value, | 111 const base::string16& autofilled_value, |
| 114 const base::string16& profile_full_name) { | 112 const base::string16& profile_full_name) { |
| 115 } | 113 } |
| 116 | 114 |
| 117 void TestAutofillClient::OnFirstUserGestureObserved() { | 115 void TestAutofillClient::OnFirstUserGestureObserved() { |
| 118 } | 116 } |
| 119 | 117 |
| 120 bool TestAutofillClient::IsContextSecure(const GURL& form_origin) { | 118 bool TestAutofillClient::IsContextSecure(const GURL& form_origin) { |
| 121 return is_context_secure_; | 119 // Simplified secure context check for tests. |
| 120 return form_origin.SchemeIs("https"); |
| 122 } | 121 } |
| 123 | 122 |
| 124 bool TestAutofillClient::ShouldShowSigninPromo() { | 123 bool TestAutofillClient::ShouldShowSigninPromo() { |
| 125 return false; | 124 return false; |
| 126 } | 125 } |
| 127 | 126 |
| 128 void TestAutofillClient::StartSigninFlow() {} | 127 void TestAutofillClient::StartSigninFlow() {} |
| 129 | 128 |
| 130 } // namespace autofill | 129 } // namespace autofill |
| OLD | NEW |