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

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

Issue 254763005: Move some content url constants to /url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initial patches. Created 6 years, 8 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/autocomplete_input.cc
diff --git a/chrome/browser/autocomplete/autocomplete_input.cc b/chrome/browser/autocomplete/autocomplete_input.cc
index e1c9d71581137514f3d5b032d82e92d061b922dd..4cf4b3aeacd291ea4a081e70675865073178ac55 100644
--- a/chrome/browser/autocomplete/autocomplete_input.cc
+++ b/chrome/browser/autocomplete/autocomplete_input.cc
@@ -12,6 +12,7 @@
#include "content/public/common/url_constants.h"
#include "net/base/net_util.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
+#include "net/base/url_constants.h"
#include "url/url_canon_ip.h"
#include "url/url_util.h"
@@ -179,8 +180,8 @@ AutocompleteInput::Type AutocompleteInput::Parse(
// (e.g. "ftp" or "view-source") but I'll wait to spend the effort on that
// until I run into some cases that really need it.
if (parts->scheme.is_nonempty() &&
- !LowerCaseEqualsASCII(parsed_scheme, content::kHttpScheme) &&
- !LowerCaseEqualsASCII(parsed_scheme, content::kHttpsScheme)) {
+ !LowerCaseEqualsASCII(parsed_scheme, net::kHttpScheme) &&
+ !LowerCaseEqualsASCII(parsed_scheme, net::kHttpsScheme)) {
// See if we know how to handle the URL internally. There are some schemes
// that we convert to other things before they reach the renderer or else
// the renderer handles internally without reaching the net::URLRequest
@@ -216,16 +217,15 @@ AutocompleteInput::Type AutocompleteInput::Parse(
default: {
// We don't know about this scheme. It might be that the user typed a
// URL of the form "username:password@foo.com".
- const base::string16 http_scheme_prefix =
- base::ASCIIToUTF16(std::string(content::kHttpScheme) +
- content::kStandardSchemeSeparator);
+ const base::string16 http_scheme_prefix = base::ASCIIToUTF16(
+ std::string(net::kHttpScheme) + content::kStandardSchemeSeparator);
url_parse::Parsed http_parts;
base::string16 http_scheme;
GURL http_canonicalized_url;
Type http_type = Parse(http_scheme_prefix + text, desired_tld,
&http_parts, &http_scheme,
&http_canonicalized_url);
- DCHECK_EQ(std::string(content::kHttpScheme),
+ DCHECK_EQ(std::string(net::kHttpScheme),
base::UTF16ToUTF8(http_scheme));
if ((http_type == URL) && http_parts.username.is_nonempty() &&
@@ -512,7 +512,7 @@ bool AutocompleteInput::HasHTTPScheme(const base::string16& input) {
if (url_util::FindAndCompareScheme(utf8_input, content::kViewSourceScheme,
&scheme))
utf8_input.erase(0, scheme.end() + 1);
- return url_util::FindAndCompareScheme(utf8_input, content::kHttpScheme, NULL);
+ return url_util::FindAndCompareScheme(utf8_input, net::kHttpScheme, NULL);
}
void AutocompleteInput::UpdateText(const base::string16& text,

Powered by Google App Engine
This is Rietveld 408576698