Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: components/omnibox/keyword_provider.cc

Issue 469623004: Move KeywordProvider to components/omnibox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move tests Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « components/omnibox/keyword_provider.h ('k') | components/omnibox/keyword_provider_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "components/omnibox/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"
14 #include "components/metrics/proto/omnibox_input_type.pb.h" 13 #include "components/metrics/proto/omnibox_input_type.pb.h"
15 #include "components/omnibox/autocomplete_match.h" 14 #include "components/omnibox/autocomplete_match.h"
16 #include "components/omnibox/autocomplete_provider_listener.h" 15 #include "components/omnibox/autocomplete_provider_listener.h"
16 #include "components/omnibox/keyword_extensions_delegate.h"
17 #include "components/search_engines/template_url.h" 17 #include "components/search_engines/template_url.h"
18 #include "components/search_engines/template_url_service.h" 18 #include "components/search_engines/template_url_service.h"
19 #include "grit/components_strings.h" 19 #include "grit/components_strings.h"
20 #include "net/base/escape.h" 20 #include "net/base/escape.h"
21 #include "net/base/net_util.h" 21 #include "net/base/net_util.h"
22 #include "ui/base/l10n/l10n_util.h" 22 #include "ui/base/l10n/l10n_util.h"
23 23
24 namespace { 24 namespace {
25 25
26 // Helper functor for Start(), for sorting keyword matches by quality. 26 // Helper functor for Start(), for sorting keyword matches by quality.
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 ACMatchClassification::NONE, &match->contents_class); 462 ACMatchClassification::NONE, &match->contents_class);
463 } 463 }
464 } 464 }
465 465
466 TemplateURLService* KeywordProvider::GetTemplateURLService() const { 466 TemplateURLService* KeywordProvider::GetTemplateURLService() const {
467 // Make sure the model is loaded. This is cheap and quickly bails out if 467 // Make sure the model is loaded. This is cheap and quickly bails out if
468 // the model is already loaded. 468 // the model is already loaded.
469 model_->Load(); 469 model_->Load();
470 return model_; 470 return model_;
471 } 471 }
OLDNEW
« no previous file with comments | « components/omnibox/keyword_provider.h ('k') | components/omnibox/keyword_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698