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 <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 const std::vector<base::string16>& labels) override; | 60 const std::vector<base::string16>& labels) override; |
61 void HideAutofillPopup() override; | 61 void HideAutofillPopup() override; |
62 bool IsAutocompleteEnabled() override; | 62 bool IsAutocompleteEnabled() override; |
63 void PropagateAutofillPredictions( | 63 void PropagateAutofillPredictions( |
64 content::RenderFrameHost* rfh, | 64 content::RenderFrameHost* rfh, |
65 const std::vector<autofill::FormStructure*>& forms) override; | 65 const std::vector<autofill::FormStructure*>& forms) override; |
66 void DidFillOrPreviewField(const base::string16& autofilled_value, | 66 void DidFillOrPreviewField(const base::string16& autofilled_value, |
67 const base::string16& profile_full_name) override; | 67 const base::string16& profile_full_name) override; |
68 void OnFirstUserGestureObserved() override; | 68 void OnFirstUserGestureObserved() override; |
69 bool IsContextSecure(const GURL& form_origin) override; | 69 bool IsContextSecure(const GURL& form_origin) override; |
| 70 const std::string& GetApplicationLocale() override; |
70 | 71 |
71 void set_is_context_secure(bool is_context_secure) { | 72 void set_is_context_secure(bool is_context_secure) { |
72 is_context_secure_ = is_context_secure; | 73 is_context_secure_ = is_context_secure; |
73 }; | 74 }; |
74 | 75 |
75 void SetPrefs(scoped_ptr<PrefService> prefs) { prefs_ = std::move(prefs); } | 76 void SetPrefs(scoped_ptr<PrefService> prefs) { prefs_ = std::move(prefs); } |
76 | 77 |
77 rappor::TestRapporService* test_rappor_service() { | 78 rappor::TestRapporService* test_rappor_service() { |
78 return rappor_service_.get(); | 79 return rappor_service_.get(); |
79 } | 80 } |
80 | 81 |
81 private: | 82 private: |
82 // NULL by default. | 83 // NULL by default. |
83 scoped_ptr<PrefService> prefs_; | 84 scoped_ptr<PrefService> prefs_; |
84 scoped_ptr<FakeOAuth2TokenService> token_service_; | 85 scoped_ptr<FakeOAuth2TokenService> token_service_; |
85 scoped_ptr<FakeIdentityProvider> identity_provider_; | 86 scoped_ptr<FakeIdentityProvider> identity_provider_; |
86 scoped_ptr<rappor::TestRapporService> rappor_service_; | 87 scoped_ptr<rappor::TestRapporService> rappor_service_; |
87 | 88 |
88 bool is_context_secure_; | 89 bool is_context_secure_; |
89 | 90 |
| 91 std::string fake_locale_ = "en_US"; |
| 92 |
90 DISALLOW_COPY_AND_ASSIGN(TestAutofillClient); | 93 DISALLOW_COPY_AND_ASSIGN(TestAutofillClient); |
91 }; | 94 }; |
92 | 95 |
93 } // namespace autofill | 96 } // namespace autofill |
94 | 97 |
95 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ | 98 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_TEST_AUTOFILL_CLIENT_H_ |
OLD | NEW |