OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/base_search_provider.h" | 5 #include "chrome/browser/autocomplete/base_search_provider.h" |
6 | 6 |
7 #include "base/i18n/case_conversion.h" | 7 #include "base/i18n/case_conversion.h" |
8 #include "base/i18n/icu_string_conversions.h" | 8 #include "base/i18n/icu_string_conversions.h" |
9 #include "base/json/json_string_value_serializer.h" | 9 #include "base/json/json_string_value_serializer.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "chrome/browser/sync/profile_sync_service.h" | 24 #include "chrome/browser/sync/profile_sync_service.h" |
25 #include "chrome/browser/sync/profile_sync_service_factory.h" | 25 #include "chrome/browser/sync/profile_sync_service_factory.h" |
26 #include "chrome/common/net/url_fixer_upper.h" | 26 #include "chrome/common/net/url_fixer_upper.h" |
27 #include "chrome/common/pref_names.h" | 27 #include "chrome/common/pref_names.h" |
28 #include "components/sync_driver/sync_prefs.h" | 28 #include "components/sync_driver/sync_prefs.h" |
29 #include "content/public/common/url_constants.h" | 29 #include "content/public/common/url_constants.h" |
30 #include "net/base/escape.h" | 30 #include "net/base/escape.h" |
31 #include "net/base/net_util.h" | 31 #include "net/base/net_util.h" |
32 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 32 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
33 #include "net/http/http_response_headers.h" | 33 #include "net/http/http_response_headers.h" |
| 34 #include "net/url_request/url_fetcher.h" |
34 #include "net/url_request/url_fetcher_delegate.h" | 35 #include "net/url_request/url_fetcher_delegate.h" |
35 #include "url/gurl.h" | 36 #include "url/gurl.h" |
36 | 37 |
37 namespace { | 38 namespace { |
38 | 39 |
39 AutocompleteMatchType::Type GetAutocompleteMatchType(const std::string& type) { | 40 AutocompleteMatchType::Type GetAutocompleteMatchType(const std::string& type) { |
40 if (type == "ENTITY") | 41 if (type == "ENTITY") |
41 return AutocompleteMatchType::SEARCH_SUGGEST_ENTITY; | 42 return AutocompleteMatchType::SEARCH_SUGGEST_ENTITY; |
42 if (type == "INFINITE") | 43 if (type == "INFINITE") |
43 return AutocompleteMatchType::SEARCH_SUGGEST_INFINITE; | 44 return AutocompleteMatchType::SEARCH_SUGGEST_INFINITE; |
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
898 } | 899 } |
899 | 900 |
900 void BaseSearchProvider::OnDeletionComplete( | 901 void BaseSearchProvider::OnDeletionComplete( |
901 bool success, SuggestionDeletionHandler* handler) { | 902 bool success, SuggestionDeletionHandler* handler) { |
902 RecordDeletionResult(success); | 903 RecordDeletionResult(success); |
903 SuggestionDeletionHandlers::iterator it = std::find( | 904 SuggestionDeletionHandlers::iterator it = std::find( |
904 deletion_handlers_.begin(), deletion_handlers_.end(), handler); | 905 deletion_handlers_.begin(), deletion_handlers_.end(), handler); |
905 DCHECK(it != deletion_handlers_.end()); | 906 DCHECK(it != deletion_handlers_.end()); |
906 deletion_handlers_.erase(it); | 907 deletion_handlers_.erase(it); |
907 } | 908 } |
OLD | NEW |