OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <algorithm> | 5 #include <algorithm> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 2823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2834 | 2834 |
2835 namespace { | 2835 namespace { |
2836 | 2836 |
2837 class MockAutofillClient : public TestAutofillClient { | 2837 class MockAutofillClient : public TestAutofillClient { |
2838 public: | 2838 public: |
2839 MockAutofillClient() {} | 2839 MockAutofillClient() {} |
2840 | 2840 |
2841 ~MockAutofillClient() override {} | 2841 ~MockAutofillClient() override {} |
2842 | 2842 |
2843 void ShowRequestAutocompleteDialog(const FormData& form, | 2843 void ShowRequestAutocompleteDialog(const FormData& form, |
2844 const GURL& source_url, | 2844 content::RenderFrameHost* rfh, |
2845 const ResultCallback& callback) override { | 2845 const ResultCallback& callback) override { |
2846 callback.Run(user_supplied_data_ ? AutocompleteResultSuccess : | 2846 callback.Run(user_supplied_data_ ? AutocompleteResultSuccess : |
2847 AutocompleteResultErrorDisabled, | 2847 AutocompleteResultErrorDisabled, |
2848 base::string16(), | 2848 base::string16(), |
2849 user_supplied_data_.get()); | 2849 user_supplied_data_.get()); |
2850 } | 2850 } |
2851 | 2851 |
2852 void SetUserSuppliedData(scoped_ptr<FormStructure> user_supplied_data) { | 2852 void SetUserSuppliedData(scoped_ptr<FormStructure> user_supplied_data) { |
2853 user_supplied_data_.reset(user_supplied_data.release()); | 2853 user_supplied_data_.reset(user_supplied_data.release()); |
2854 } | 2854 } |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2927 // results. This triggers the combined message send. | 2927 // results. This triggers the combined message send. |
2928 AutocompleteSuggestionsReturned(std::vector<base::string16>()); | 2928 AutocompleteSuggestionsReturned(std::vector<base::string16>()); |
2929 | 2929 |
2930 external_delegate_->CheckSuggestions( | 2930 external_delegate_->CheckSuggestions( |
2931 kDefaultPageID, | 2931 kDefaultPageID, |
2932 Suggestion("Visa - 3456", "04/12", kVisaCard, | 2932 Suggestion("Visa - 3456", "04/12", kVisaCard, |
2933 autofill_manager_->GetPackedCreditCardID(4))); | 2933 autofill_manager_->GetPackedCreditCardID(4))); |
2934 } | 2934 } |
2935 | 2935 |
2936 } // namespace autofill | 2936 } // namespace autofill |
OLD | NEW |