| 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 #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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 const std::vector<base::string16>& labels) override; | 61 const std::vector<base::string16>& labels) override; |
| 62 void HideAutofillPopup() override; | 62 void HideAutofillPopup() override; |
| 63 bool IsAutocompleteEnabled() override; | 63 bool IsAutocompleteEnabled() override; |
| 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 IsMainUrlSecure() override; |
| 71 bool ShouldShowSigninPromo() override; | 72 bool ShouldShowSigninPromo() override; |
| 72 void StartSigninFlow() override; | 73 void StartSigninFlow() override; |
| 73 void ShowHttpNotSecureExplanation() override; | 74 void ShowHttpNotSecureExplanation() override; |
| 74 | 75 |
| 75 void SetPrefs(std::unique_ptr<PrefService> prefs) { | 76 void SetPrefs(std::unique_ptr<PrefService> prefs) { |
| 76 prefs_ = std::move(prefs); | 77 prefs_ = std::move(prefs); |
| 77 } | 78 } |
| 78 | 79 |
| 79 rappor::TestRapporServiceImpl* test_rappor_service() { | 80 rappor::TestRapporServiceImpl* test_rappor_service() { |
| 80 return rappor_service_.get(); | 81 return rappor_service_.get(); |
| 81 } | 82 } |
| 82 | 83 |
| 84 void set_main_url_secure() { is_main_url_secure_ = true; } |
| 85 |
| 83 private: | 86 private: |
| 84 // NULL by default. | 87 // NULL by default. |
| 85 std::unique_ptr<PrefService> prefs_; | 88 std::unique_ptr<PrefService> prefs_; |
| 86 std::unique_ptr<FakeOAuth2TokenService> token_service_; | 89 std::unique_ptr<FakeOAuth2TokenService> token_service_; |
| 87 std::unique_ptr<FakeIdentityProvider> identity_provider_; | 90 std::unique_ptr<FakeIdentityProvider> identity_provider_; |
| 88 std::unique_ptr<rappor::TestRapporServiceImpl> rappor_service_; | 91 std::unique_ptr<rappor::TestRapporServiceImpl> rappor_service_; |
| 92 bool is_main_url_secure_ = false; |
| 89 | 93 |
| 90 DISALLOW_COPY_AND_ASSIGN(TestAutofillClient); | 94 DISALLOW_COPY_AND_ASSIGN(TestAutofillClient); |
| 91 }; | 95 }; |
| 92 | 96 |
| 93 } // namespace autofill | 97 } // namespace autofill |
| 94 | 98 |
| 95 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ | 99 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ |
| OLD | NEW |