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/strings/string16.h" | 11 #include "base/strings/string16.h" |
11 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
12 #include "components/autofill/core/browser/autofill_client.h" | 13 #include "components/autofill/core/browser/autofill_client.h" |
13 #include "components/autofill/core/browser/autofill_driver.h" | 14 #include "components/autofill/core/browser/autofill_driver.h" |
14 #include "components/autofill/core/browser/autofill_external_delegate.h" | 15 #include "components/autofill/core/browser/autofill_external_delegate.h" |
15 #include "components/autofill/core/browser/validation.h" | 16 #include "components/autofill/core/browser/validation.h" |
16 #include "components/autofill/core/common/autofill_pref_names.h" | 17 #include "components/autofill/core/common/autofill_pref_names.h" |
17 #include "components/autofill/core/common/form_data.h" | 18 #include "components/autofill/core/common/form_data.h" |
18 | 19 |
19 namespace autofill { | 20 namespace autofill { |
(...skipping 26 matching lines...) Expand all Loading... |
46 DCHECK(autofill_client_); | 47 DCHECK(autofill_client_); |
47 } | 48 } |
48 | 49 |
49 AutocompleteHistoryManager::~AutocompleteHistoryManager() { | 50 AutocompleteHistoryManager::~AutocompleteHistoryManager() { |
50 CancelPendingQuery(); | 51 CancelPendingQuery(); |
51 } | 52 } |
52 | 53 |
53 void AutocompleteHistoryManager::OnWebDataServiceRequestDone( | 54 void AutocompleteHistoryManager::OnWebDataServiceRequestDone( |
54 WebDataServiceBase::Handle h, | 55 WebDataServiceBase::Handle h, |
55 const WDTypedResult* result) { | 56 const WDTypedResult* result) { |
| 57 // TODO(vadimt): Remove ScopedProfile below once crbug.com/422460 is fixed. |
| 58 tracked_objects::ScopedProfile tracking_profile( |
| 59 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 60 "422460 AutocompleteHistoryManager::OnWebDataServiceRequestDone")); |
| 61 |
56 DCHECK(pending_query_handle_); | 62 DCHECK(pending_query_handle_); |
57 pending_query_handle_ = 0; | 63 pending_query_handle_ = 0; |
58 | 64 |
59 if (!autofill_client_->IsAutocompleteEnabled()) { | 65 if (!autofill_client_->IsAutocompleteEnabled()) { |
60 SendSuggestions(NULL); | 66 SendSuggestions(NULL); |
61 return; | 67 return; |
62 } | 68 } |
63 | 69 |
64 DCHECK(result); | 70 DCHECK(result); |
65 // Returning early here if |result| is NULL. We've seen this happen on | 71 // Returning early here if |result| is NULL. We've seen this happen on |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 autofill_unique_ids_); | 194 autofill_unique_ids_); |
189 | 195 |
190 query_id_ = 0; | 196 query_id_ = 0; |
191 autofill_values_.clear(); | 197 autofill_values_.clear(); |
192 autofill_labels_.clear(); | 198 autofill_labels_.clear(); |
193 autofill_icons_.clear(); | 199 autofill_icons_.clear(); |
194 autofill_unique_ids_.clear(); | 200 autofill_unique_ids_.clear(); |
195 } | 201 } |
196 | 202 |
197 } // namespace autofill | 203 } // namespace autofill |
OLD | NEW |