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 #include "chrome/browser/autocomplete/keyword_provider.h" | 5 #include "chrome/browser/autocomplete/keyword_provider.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
13 #include "chrome/browser/autocomplete/keyword_extensions_delegate.h" | 13 #include "chrome/browser/autocomplete/keyword_extensions_delegate.h" |
14 #include "chrome/browser/chrome_notification_types.h" | 14 #include "chrome/browser/chrome_notification_types.h" |
15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/search_engines/template_url_service_factory.h" | 16 #include "chrome/browser/search_engines/template_url_service_factory.h" |
17 #include "components/autocomplete/autocomplete_match.h" | |
18 #include "components/autocomplete/autocomplete_provider_listener.h" | |
19 #include "components/metrics/proto/omnibox_input_type.pb.h" | 17 #include "components/metrics/proto/omnibox_input_type.pb.h" |
| 18 #include "components/omnibox/autocomplete_match.h" |
| 19 #include "components/omnibox/autocomplete_provider_listener.h" |
20 #include "components/search_engines/template_url.h" | 20 #include "components/search_engines/template_url.h" |
21 #include "components/search_engines/template_url_service.h" | 21 #include "components/search_engines/template_url_service.h" |
22 #include "content/public/browser/notification_details.h" | 22 #include "content/public/browser/notification_details.h" |
23 #include "content/public/browser/notification_source.h" | 23 #include "content/public/browser/notification_source.h" |
24 #include "extensions/browser/extension_system.h" | 24 #include "extensions/browser/extension_system.h" |
25 #include "grit/generated_resources.h" | 25 #include "grit/generated_resources.h" |
26 #include "net/base/escape.h" | 26 #include "net/base/escape.h" |
27 #include "net/base/net_util.h" | 27 #include "net/base/net_util.h" |
28 #include "ui/base/l10n/l10n_util.h" | 28 #include "ui/base/l10n/l10n_util.h" |
29 | 29 |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 | 488 |
489 TemplateURLService* KeywordProvider::GetTemplateURLService() const { | 489 TemplateURLService* KeywordProvider::GetTemplateURLService() const { |
490 TemplateURLService* service = profile_ ? | 490 TemplateURLService* service = profile_ ? |
491 TemplateURLServiceFactory::GetForProfile(profile_) : model_; | 491 TemplateURLServiceFactory::GetForProfile(profile_) : model_; |
492 // Make sure the model is loaded. This is cheap and quickly bails out if | 492 // Make sure the model is loaded. This is cheap and quickly bails out if |
493 // the model is already loaded. | 493 // the model is already loaded. |
494 DCHECK(service); | 494 DCHECK(service); |
495 service->Load(); | 495 service->Load(); |
496 return service; | 496 return service; |
497 } | 497 } |
OLD | NEW |