OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/autocomplete_history_manager.h" | 5 #include "chrome/browser/autocomplete_history_manager.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 } | 232 } |
233 | 233 |
234 AutocompleteHistoryManager::AutocompleteHistoryManager( | 234 AutocompleteHistoryManager::AutocompleteHistoryManager( |
235 TabContents* tab_contents, | 235 TabContents* tab_contents, |
236 Profile* profile, | 236 Profile* profile, |
237 WebDataService* wds) | 237 WebDataService* wds) |
238 : TabContentsObserver(tab_contents), | 238 : TabContentsObserver(tab_contents), |
239 profile_(profile), | 239 profile_(profile), |
240 web_data_service_(wds), | 240 web_data_service_(wds), |
241 pending_query_handle_(0), | 241 pending_query_handle_(0), |
242 query_id_(0) { | 242 query_id_(0), |
| 243 external_delegate_(NULL) { |
243 autofill_enabled_.Init( | 244 autofill_enabled_.Init( |
244 prefs::kAutofillEnabled, profile_->GetPrefs(), NULL); | 245 prefs::kAutofillEnabled, profile_->GetPrefs(), NULL); |
245 } | 246 } |
246 | 247 |
247 void AutocompleteHistoryManager::CancelPendingQuery() { | 248 void AutocompleteHistoryManager::CancelPendingQuery() { |
248 if (pending_query_handle_) { | 249 if (pending_query_handle_) { |
249 SendSuggestions(NULL); | 250 SendSuggestions(NULL); |
250 if (web_data_service_.get()) | 251 if (web_data_service_.get()) |
251 web_data_service_->CancelRequest(pending_query_handle_); | 252 web_data_service_->CancelRequest(pending_query_handle_); |
252 pending_query_handle_ = 0; | 253 pending_query_handle_ = 0; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 autofill_icons_, | 292 autofill_icons_, |
292 autofill_unique_ids_)); | 293 autofill_unique_ids_)); |
293 } | 294 } |
294 | 295 |
295 query_id_ = 0; | 296 query_id_ = 0; |
296 autofill_values_.clear(); | 297 autofill_values_.clear(); |
297 autofill_labels_.clear(); | 298 autofill_labels_.clear(); |
298 autofill_icons_.clear(); | 299 autofill_icons_.clear(); |
299 autofill_unique_ids_.clear(); | 300 autofill_unique_ids_.clear(); |
300 } | 301 } |
OLD | NEW |