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

Unified Diff: content/common/url_schemes.cc

Issue 1272113002: Allow url::SchemeHostPort to hold non-file scheme without port (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 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
« no previous file with comments | « content/browser/site_instance_impl_unittest.cc ('k') | content/public/common/content_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/url_schemes.cc
diff --git a/content/common/url_schemes.cc b/content/common/url_schemes.cc
index c65bb14562de2f2c0f182c6882bc9d9d808e4205..26fee9383311bf03a3dd87c263167d5cfb1df1f8 100644
--- a/content/common/url_schemes.cc
+++ b/content/common/url_schemes.cc
@@ -19,8 +19,8 @@
namespace {
-void AddStandardSchemeHelper(const std::string& scheme) {
- url::AddStandardScheme(scheme.c_str());
+void AddStandardSchemeHelper(const url::SchemeWithType& scheme) {
+ url::AddStandardScheme(scheme.scheme, scheme.type);
}
} // namespace
@@ -28,15 +28,15 @@ void AddStandardSchemeHelper(const std::string& scheme) {
namespace content {
void RegisterContentSchemes(bool lock_standard_schemes) {
- std::vector<std::string> additional_standard_schemes;
+ std::vector<url::SchemeWithType> additional_standard_schemes;
std::vector<std::string> additional_savable_schemes;
GetContentClient()->AddAdditionalSchemes(&additional_standard_schemes,
&additional_savable_schemes);
- url::AddStandardScheme(kChromeDevToolsScheme);
- url::AddStandardScheme(kChromeUIScheme);
- url::AddStandardScheme(kGuestScheme);
- url::AddStandardScheme(kMetadataScheme);
+ url::AddStandardScheme(kChromeDevToolsScheme, url::SCHEME_WITHOUT_PORT);
+ url::AddStandardScheme(kChromeUIScheme, url::SCHEME_WITHOUT_PORT);
+ url::AddStandardScheme(kGuestScheme, url::SCHEME_WITHOUT_PORT);
+ url::AddStandardScheme(kMetadataScheme, url::SCHEME_WITHOUT_AUTHORITY);
std::for_each(additional_standard_schemes.begin(),
additional_standard_schemes.end(),
AddStandardSchemeHelper);
« no previous file with comments | « content/browser/site_instance_impl_unittest.cc ('k') | content/public/common/content_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698