| 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/history_url_provider.h" | 5 #include "chrome/browser/autocomplete/history_url_provider.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "chrome/browser/prefs/pref_service.h" | 24 #include "chrome/browser/prefs/pref_service.h" |
| 25 #include "chrome/browser/profiles/profile.h" | 25 #include "chrome/browser/profiles/profile.h" |
| 26 #include "chrome/common/chrome_switches.h" | 26 #include "chrome/common/chrome_switches.h" |
| 27 #include "chrome/common/pref_names.h" | 27 #include "chrome/common/pref_names.h" |
| 28 #include "chrome/common/url_constants.h" | 28 #include "chrome/common/url_constants.h" |
| 29 #include "content/public/browser/browser_thread.h" | 29 #include "content/public/browser/browser_thread.h" |
| 30 #include "googleurl/src/gurl.h" | 30 #include "googleurl/src/gurl.h" |
| 31 #include "googleurl/src/url_parse.h" | 31 #include "googleurl/src/url_parse.h" |
| 32 #include "googleurl/src/url_util.h" | 32 #include "googleurl/src/url_util.h" |
| 33 #include "net/base/net_util.h" | 33 #include "net/base/net_util.h" |
| 34 #include "net/base/registry_controlled_domain.h" | 34 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
| 35 | 35 |
| 36 namespace { | 36 namespace { |
| 37 | 37 |
| 38 // Ensures that |matches| contains an entry for |info|, which may mean adding a | 38 // Ensures that |matches| contains an entry for |info|, which may mean adding a |
| 39 // new such entry (using |input_location| and |match_in_scheme|). | 39 // new such entry (using |input_location| and |match_in_scheme|). |
| 40 // | 40 // |
| 41 // If |promote| is true, this also ensures the entry is the first element in | 41 // If |promote| is true, this also ensures the entry is the first element in |
| 42 // |matches|, moving or adding it to the front as appropriate. When |promote| | 42 // |matches|, moving or adding it to the front as appropriate. When |promote| |
| 43 // is false, existing matches are left in place, and newly added matches are | 43 // is false, existing matches are left in place, and newly added matches are |
| 44 // placed at the back. | 44 // placed at the back. |
| (...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 931 &match.contents_class); | 931 &match.contents_class); |
| 932 } | 932 } |
| 933 match.description = info.title(); | 933 match.description = info.title(); |
| 934 AutocompleteMatch::ClassifyMatchInString(params->input.text(), | 934 AutocompleteMatch::ClassifyMatchInString(params->input.text(), |
| 935 info.title(), | 935 info.title(), |
| 936 ACMatchClassification::NONE, | 936 ACMatchClassification::NONE, |
| 937 &match.description_class); | 937 &match.description_class); |
| 938 | 938 |
| 939 return match; | 939 return match; |
| 940 } | 940 } |
| OLD | NEW |