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

Side by Side Diff: chrome/browser/autocomplete/history_url_provider.cc

Issue 1152373003: url: Fix the TODO in url_parse.h header. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
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/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 24 matching lines...) Expand all
35 #include "components/omnibox/autocomplete_provider_listener.h" 35 #include "components/omnibox/autocomplete_provider_listener.h"
36 #include "components/omnibox/autocomplete_result.h" 36 #include "components/omnibox/autocomplete_result.h"
37 #include "components/omnibox/omnibox_field_trial.h" 37 #include "components/omnibox/omnibox_field_trial.h"
38 #include "components/omnibox/url_prefix.h" 38 #include "components/omnibox/url_prefix.h"
39 #include "components/search_engines/template_url_service.h" 39 #include "components/search_engines/template_url_service.h"
40 #include "components/url_fixer/url_fixer.h" 40 #include "components/url_fixer/url_fixer.h"
41 #include "content/public/browser/browser_thread.h" 41 #include "content/public/browser/browser_thread.h"
42 #include "net/base/net_util.h" 42 #include "net/base/net_util.h"
43 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" 43 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
44 #include "url/gurl.h" 44 #include "url/gurl.h"
45 #include "url/url_parse.h" 45 #include "url/third_party/mozilla/url_parse.h"
46 #include "url/url_util.h" 46 #include "url/url_util.h"
47 47
48 namespace { 48 namespace {
49 49
50 // Acts like the > operator for URLInfo classes. 50 // Acts like the > operator for URLInfo classes.
51 bool CompareHistoryMatch(const history::HistoryMatch& a, 51 bool CompareHistoryMatch(const history::HistoryMatch& a,
52 const history::HistoryMatch& b) { 52 const history::HistoryMatch& b) {
53 // A URL that has been typed at all is better than one that has never been 53 // A URL that has been typed at all is better than one that has never been
54 // typed. (Note "!"s on each side) 54 // typed. (Note "!"s on each side)
55 if (!a.url_info.typed_count() != !b.url_info.typed_count()) 55 if (!a.url_info.typed_count() != !b.url_info.typed_count())
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 AutocompleteMatch::ClassifyLocationInString(base::string16::npos, 0, 1179 AutocompleteMatch::ClassifyLocationInString(base::string16::npos, 0,
1180 match.contents.length(), ACMatchClassification::URL, 1180 match.contents.length(), ACMatchClassification::URL,
1181 &match.contents_class); 1181 &match.contents_class);
1182 } 1182 }
1183 match.description = info.title(); 1183 match.description = info.title();
1184 match.description_class = 1184 match.description_class =
1185 ClassifyDescription(params.input.text(), match.description); 1185 ClassifyDescription(params.input.text(), match.description);
1186 RecordAdditionalInfoFromUrlRow(info, &match); 1186 RecordAdditionalInfoFromUrlRow(info, &match);
1187 return match; 1187 return match;
1188 } 1188 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/history_quick_provider.cc ('k') | chrome/browser/autocomplete/shortcuts_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698