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

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

Issue 2419853002: [Autofill] Do not offer autofill suggestions on insecure forms (Closed)
Patch Set: Scheme check for HTTPS Created 4 years, 2 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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 void PropagateAutofillPredictions( 64 void PropagateAutofillPredictions(
65 content::RenderFrameHost* rfh, 65 content::RenderFrameHost* rfh,
66 const std::vector<autofill::FormStructure*>& forms) override; 66 const std::vector<autofill::FormStructure*>& forms) override;
67 void DidFillOrPreviewField(const base::string16& autofilled_value, 67 void DidFillOrPreviewField(const base::string16& autofilled_value,
68 const base::string16& profile_full_name) override; 68 const base::string16& profile_full_name) override;
69 void OnFirstUserGestureObserved() override; 69 void OnFirstUserGestureObserved() override;
70 bool IsContextSecure(const GURL& form_origin) override; 70 bool IsContextSecure(const GURL& form_origin) override;
71 bool ShouldShowSigninPromo() override; 71 bool ShouldShowSigninPromo() override;
72 void StartSigninFlow() override; 72 void StartSigninFlow() override;
73 73
74 void set_is_context_secure(bool is_context_secure) {
75 is_context_secure_ = is_context_secure;
76 }
77
78 void SetPrefs(std::unique_ptr<PrefService> prefs) { 74 void SetPrefs(std::unique_ptr<PrefService> prefs) {
79 prefs_ = std::move(prefs); 75 prefs_ = std::move(prefs);
80 } 76 }
81 77
82 rappor::TestRapporService* test_rappor_service() { 78 rappor::TestRapporService* test_rappor_service() {
83 return rappor_service_.get(); 79 return rappor_service_.get();
84 } 80 }
85 81
86 private: 82 private:
87 // NULL by default. 83 // NULL by default.
88 std::unique_ptr<PrefService> prefs_; 84 std::unique_ptr<PrefService> prefs_;
89 std::unique_ptr<FakeOAuth2TokenService> token_service_; 85 std::unique_ptr<FakeOAuth2TokenService> token_service_;
90 std::unique_ptr<FakeIdentityProvider> identity_provider_; 86 std::unique_ptr<FakeIdentityProvider> identity_provider_;
91 std::unique_ptr<rappor::TestRapporService> rappor_service_; 87 std::unique_ptr<rappor::TestRapporService> rappor_service_;
92 88
93 bool is_context_secure_;
94
95 DISALLOW_COPY_AND_ASSIGN(TestAutofillClient); 89 DISALLOW_COPY_AND_ASSIGN(TestAutofillClient);
96 }; 90 };
97 91
98 } // namespace autofill 92 } // namespace autofill
99 93
100 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ 94 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698