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

Unified Diff: chrome/browser/autocomplete/shortcuts_provider.cc

Issue 320253004: Componentize URLFixerUpper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win64 fix Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autocomplete/shortcuts_provider.cc
diff --git a/chrome/browser/autocomplete/shortcuts_provider.cc b/chrome/browser/autocomplete/shortcuts_provider.cc
index a8868b5d503759318406949e28b46198eb503773..aeec5a1f53f4e5be264b116a97aceba026bb890b 100644
--- a/chrome/browser/autocomplete/shortcuts_provider.cc
+++ b/chrome/browser/autocomplete/shortcuts_provider.cc
@@ -30,10 +30,10 @@
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/omnibox/omnibox_field_trial.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/common/net/url_fixer_upper.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "components/metrics/proto/omnibox_input_type.pb.h"
+#include "components/url_fixer/url_fixer.h"
#include "url/url_parse.h"
namespace {
@@ -140,8 +140,8 @@ void ShortcutsProvider::GetMatches(const AutocompleteInput& input) {
base::string16 term_string(base::i18n::ToLower(input.text()));
DCHECK(!term_string.empty());
- const GURL& input_as_gurl = URLFixerUpper::FixupURL(
- base::UTF16ToUTF8(input.text()), std::string());
+ const GURL& input_as_gurl =
+ url_fixer::FixupURL(base::UTF16ToUTF8(input.text()), std::string());
const base::string16 fixed_up_input(FixupUserInput(input).second);
int max_relevance;
@@ -245,9 +245,10 @@ AutocompleteMatch ShortcutsProvider::ShortcutToACMatch(
// Also allow a user's input to be marked as default if it would be fixed
// up to the same thing as the fill_into_edit. This handles cases like
// the user input containing a trailing slash absent in fill_into_edit.
- match.allowed_to_be_default_match = (input_as_gurl ==
- URLFixerUpper::FixupURL(base::UTF16ToUTF8(match.fill_into_edit),
- std::string()));
+ match.allowed_to_be_default_match =
+ (input_as_gurl ==
+ url_fixer::FixupURL(base::UTF16ToUTF8(match.fill_into_edit),
+ std::string()));
}
}
« no previous file with comments | « chrome/browser/autocomplete/history_url_provider_unittest.cc ('k') | chrome/browser/autocomplete/zero_suggest_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698