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 "components/autofill/core/browser/autocomplete_history_manager.h" | 5 #include "components/autofill/core/browser/autocomplete_history_manager.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "base/profiler/scoped_profile.h" | 10 #include "base/profiler/scoped_profile.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 const WDResult<std::vector<base::string16> >* autofill_result = | 80 const WDResult<std::vector<base::string16> >* autofill_result = |
81 static_cast<const WDResult<std::vector<base::string16> >*>(result); | 81 static_cast<const WDResult<std::vector<base::string16> >*>(result); |
82 std::vector<base::string16> suggestions = autofill_result->GetValue(); | 82 std::vector<base::string16> suggestions = autofill_result->GetValue(); |
83 SendSuggestions(&suggestions); | 83 SendSuggestions(&suggestions); |
84 } | 84 } |
85 | 85 |
86 void AutocompleteHistoryManager::OnGetAutocompleteSuggestions( | 86 void AutocompleteHistoryManager::OnGetAutocompleteSuggestions( |
87 int query_id, | 87 int query_id, |
88 const base::string16& name, | 88 const base::string16& name, |
89 const base::string16& prefix, | 89 const base::string16& prefix, |
90 const std::string form_control_type, | 90 const std::string& form_control_type, |
91 const std::vector<base::string16>& autofill_values, | 91 const std::vector<base::string16>& autofill_values, |
92 const std::vector<base::string16>& autofill_labels, | 92 const std::vector<base::string16>& autofill_labels, |
93 const std::vector<base::string16>& autofill_icons, | 93 const std::vector<base::string16>& autofill_icons, |
94 const std::vector<int>& autofill_unique_ids) { | 94 const std::vector<int>& autofill_unique_ids) { |
95 CancelPendingQuery(); | 95 CancelPendingQuery(); |
96 | 96 |
97 query_id_ = query_id; | 97 query_id_ = query_id; |
98 autofill_values_ = autofill_values; | 98 autofill_values_ = autofill_values; |
99 autofill_labels_ = autofill_labels; | 99 autofill_labels_ = autofill_labels; |
100 autofill_icons_ = autofill_icons; | 100 autofill_icons_ = autofill_icons; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 autofill_unique_ids_); | 194 autofill_unique_ids_); |
195 | 195 |
196 query_id_ = 0; | 196 query_id_ = 0; |
197 autofill_values_.clear(); | 197 autofill_values_.clear(); |
198 autofill_labels_.clear(); | 198 autofill_labels_.clear(); |
199 autofill_icons_.clear(); | 199 autofill_icons_.clear(); |
200 autofill_unique_ids_.clear(); | 200 autofill_unique_ids_.clear(); |
201 } | 201 } |
202 | 202 |
203 } // namespace autofill | 203 } // namespace autofill |
OLD | NEW |