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