| 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_tracker.h" |
| 11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "components/autofill/core/browser/autofill_client.h" | 13 #include "components/autofill/core/browser/autofill_client.h" |
| 14 #include "components/autofill/core/browser/autofill_driver.h" | 14 #include "components/autofill/core/browser/autofill_driver.h" |
| 15 #include "components/autofill/core/browser/autofill_external_delegate.h" | 15 #include "components/autofill/core/browser/autofill_external_delegate.h" |
| 16 #include "components/autofill/core/browser/validation.h" | 16 #include "components/autofill/core/browser/validation.h" |
| 17 #include "components/autofill/core/common/autofill_pref_names.h" | 17 #include "components/autofill/core/common/autofill_pref_names.h" |
| 18 #include "components/autofill/core/common/form_data.h" | 18 #include "components/autofill/core/common/form_data.h" |
| 19 | 19 |
| 20 namespace autofill { | 20 namespace autofill { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 47 DCHECK(autofill_client_); | 47 DCHECK(autofill_client_); |
| 48 } | 48 } |
| 49 | 49 |
| 50 AutocompleteHistoryManager::~AutocompleteHistoryManager() { | 50 AutocompleteHistoryManager::~AutocompleteHistoryManager() { |
| 51 CancelPendingQuery(); | 51 CancelPendingQuery(); |
| 52 } | 52 } |
| 53 | 53 |
| 54 void AutocompleteHistoryManager::OnWebDataServiceRequestDone( | 54 void AutocompleteHistoryManager::OnWebDataServiceRequestDone( |
| 55 WebDataServiceBase::Handle h, | 55 WebDataServiceBase::Handle h, |
| 56 const WDTypedResult* result) { | 56 const WDTypedResult* result) { |
| 57 // TODO(vadimt): Remove ScopedProfile below once crbug.com/422460 is fixed. | 57 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422460 is fixed. |
| 58 tracked_objects::ScopedProfile tracking_profile( | 58 tracked_objects::ScopedTracker tracking_profile( |
| 59 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 59 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 60 "422460 AutocompleteHistoryManager::OnWebDataServiceRequestDone")); | 60 "422460 AutocompleteHistoryManager::OnWebDataServiceRequestDone")); |
| 61 | 61 |
| 62 DCHECK(pending_query_handle_); | 62 DCHECK(pending_query_handle_); |
| 63 pending_query_handle_ = 0; | 63 pending_query_handle_ = 0; |
| 64 | 64 |
| 65 if (!autofill_client_->IsAutocompleteEnabled()) { | 65 if (!autofill_client_->IsAutocompleteEnabled()) { |
| 66 SendSuggestions(NULL); | 66 SendSuggestions(NULL); |
| 67 return; | 67 return; |
| 68 } | 68 } |
| (...skipping 125 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 |