| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_ |
| 6 #define COMPONENTS_AUTOFILL_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_ | 6 #define COMPONENTS_AUTOFILL_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 friend class AutofillManagerTest; | 62 friend class AutofillManagerTest; |
| 63 | 63 |
| 64 // Sends the given |suggestions| for display in the Autofill popup. | 64 // Sends the given |suggestions| for display in the Autofill popup. |
| 65 void SendSuggestions(const std::vector<base::string16>* suggestions); | 65 void SendSuggestions(const std::vector<base::string16>* suggestions); |
| 66 | 66 |
| 67 private: | 67 private: |
| 68 // Cancels the currently pending WebDataService query, if there is one. | 68 // Cancels the currently pending WebDataService query, if there is one. |
| 69 void CancelPendingQuery(); | 69 void CancelPendingQuery(); |
| 70 | 70 |
| 71 content::BrowserContext* browser_context_; | 71 content::BrowserContext* browser_context_; |
| 72 scoped_refptr<AutofillWebDataService> autofill_data_; | 72 AutofillWebDataService* autofill_data_; |
| 73 | 73 |
| 74 BooleanPrefMember autofill_enabled_; | 74 BooleanPrefMember autofill_enabled_; |
| 75 | 75 |
| 76 // When the manager makes a request from WebDataServiceBase, the database is | 76 // When the manager makes a request from WebDataServiceBase, the database is |
| 77 // queried on another thread, we record the query handle until we get called | 77 // queried on another thread, we record the query handle until we get called |
| 78 // back. We also store the autofill results so we can send them together. | 78 // back. We also store the autofill results so we can send them together. |
| 79 WebDataServiceBase::Handle pending_query_handle_; | 79 WebDataServiceBase::Handle pending_query_handle_; |
| 80 int query_id_; | 80 int query_id_; |
| 81 std::vector<base::string16> autofill_values_; | 81 std::vector<base::string16> autofill_values_; |
| 82 std::vector<base::string16> autofill_labels_; | 82 std::vector<base::string16> autofill_labels_; |
| 83 std::vector<base::string16> autofill_icons_; | 83 std::vector<base::string16> autofill_icons_; |
| 84 std::vector<int> autofill_unique_ids_; | 84 std::vector<int> autofill_unique_ids_; |
| 85 | 85 |
| 86 // Delegate to perform external processing (display, selection) on | 86 // Delegate to perform external processing (display, selection) on |
| 87 // our behalf. Weak. | 87 // our behalf. Weak. |
| 88 AutofillExternalDelegate* external_delegate_; | 88 AutofillExternalDelegate* external_delegate_; |
| 89 | 89 |
| 90 DISALLOW_COPY_AND_ASSIGN(AutocompleteHistoryManager); | 90 DISALLOW_COPY_AND_ASSIGN(AutocompleteHistoryManager); |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 } // namespace autofill | 93 } // namespace autofill |
| 94 | 94 |
| 95 #endif // COMPONENTS_AUTOFILL_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_ | 95 #endif // COMPONENTS_AUTOFILL_BROWSER_AUTOCOMPLETE_HISTORY_MANAGER_H_ |
| OLD | NEW |