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

Side by Side Diff: components/autofill/core/browser/test_autofill_client.cc

Issue 2672623005: Record Autofill form events specially for nonsecure pages (Closed)
Patch Set: fix test added in rebase Created 3 years, 10 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 unified diff | Download patch
OLDNEW
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::TestRapporServiceImpl()) {} 14 rappor_service_(new rappor::TestRapporServiceImpl()),
15 form_origin_(GURL("https://example.test")) {}
15 16
16 TestAutofillClient::~TestAutofillClient() { 17 TestAutofillClient::~TestAutofillClient() {
17 } 18 }
18 19
19 PersonalDataManager* TestAutofillClient::GetPersonalDataManager() { 20 PersonalDataManager* TestAutofillClient::GetPersonalDataManager() {
20 return nullptr; 21 return nullptr;
21 } 22 }
22 23
23 scoped_refptr<AutofillWebDataService> TestAutofillClient::GetDatabase() { 24 scoped_refptr<AutofillWebDataService> TestAutofillClient::GetDatabase() {
24 return scoped_refptr<AutofillWebDataService>(nullptr); 25 return scoped_refptr<AutofillWebDataService>(nullptr);
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 } 109 }
109 110
110 void TestAutofillClient::DidFillOrPreviewField( 111 void TestAutofillClient::DidFillOrPreviewField(
111 const base::string16& autofilled_value, 112 const base::string16& autofilled_value,
112 const base::string16& profile_full_name) { 113 const base::string16& profile_full_name) {
113 } 114 }
114 115
115 void TestAutofillClient::OnFirstUserGestureObserved() { 116 void TestAutofillClient::OnFirstUserGestureObserved() {
116 } 117 }
117 118
118 bool TestAutofillClient::IsContextSecure(const GURL& form_origin) { 119 bool TestAutofillClient::IsContextSecure() {
119 // Simplified secure context check for tests. 120 // Simplified secure context check for tests.
120 return form_origin.SchemeIs("https"); 121 return form_origin_.SchemeIs("https");
121 } 122 }
122 123
123 bool TestAutofillClient::ShouldShowSigninPromo() { 124 bool TestAutofillClient::ShouldShowSigninPromo() {
124 return false; 125 return false;
125 } 126 }
126 127
127 void TestAutofillClient::StartSigninFlow() {} 128 void TestAutofillClient::StartSigninFlow() {}
128 129
129 void TestAutofillClient::ShowHttpNotSecureExplanation() {} 130 void TestAutofillClient::ShowHttpNotSecureExplanation() {}
130 131
131 } // namespace autofill 132 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698