OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "app/l10n_util.h" |
10 #include "base/string_util.h" | 11 #include "base/string_util.h" |
11 #include "chrome/browser/profile.h" | 12 #include "chrome/browser/profile.h" |
12 #include "chrome/browser/search_engines/template_url.h" | 13 #include "chrome/browser/search_engines/template_url.h" |
13 #include "chrome/browser/search_engines/template_url_model.h" | 14 #include "chrome/browser/search_engines/template_url_model.h" |
14 #include "chrome/common/l10n_util.h" | |
15 #include "grit/generated_resources.h" | 15 #include "grit/generated_resources.h" |
16 #include "net/base/escape.h" | 16 #include "net/base/escape.h" |
17 #include "net/base/net_util.h" | 17 #include "net/base/net_util.h" |
18 | 18 |
19 // static | 19 // static |
20 std::wstring KeywordProvider::SplitReplacementStringFromInput( | 20 std::wstring KeywordProvider::SplitReplacementStringFromInput( |
21 const std::wstring& input) { | 21 const std::wstring& input) { |
22 // The input may contain leading whitespace, strip it. | 22 // The input may contain leading whitespace, strip it. |
23 std::wstring trimmed_input; | 23 std::wstring trimmed_input; |
24 TrimWhitespace(input, TRIM_LEADING, &trimmed_input); | 24 TrimWhitespace(input, TRIM_LEADING, &trimmed_input); |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 AutocompleteMatch::ClassifyLocationInString(kKeywordDesc.find(L"%s"), | 300 AutocompleteMatch::ClassifyLocationInString(kKeywordDesc.find(L"%s"), |
301 prefix_length, | 301 prefix_length, |
302 result.description.length(), | 302 result.description.length(), |
303 ACMatchClassification::DIM, | 303 ACMatchClassification::DIM, |
304 &result.description_class); | 304 &result.description_class); |
305 | 305 |
306 result.transition = PageTransition::KEYWORD; | 306 result.transition = PageTransition::KEYWORD; |
307 | 307 |
308 return result; | 308 return result; |
309 } | 309 } |
OLD | NEW |