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

Unified Diff: chrome/common/chrome_content_client.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 | « chrome/common/chrome_content_client.h ('k') | chrome/common/chrome_content_client_ios.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_content_client.cc
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
index bc33c6275c21ffe2ca05de3426e6fb0b5a259e4e..c577edf5507b7d886645f1b9f874816cd75c6c09 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -506,21 +506,33 @@ void ChromeContentClient::AddPepperPlugins(
#endif // defined(ENABLE_PLUGINS)
}
+#if defined(OS_CHROMEOS)
+static const int kNumChromeStandardURLSchemes = 6;
+#else
+static const int kNumChromeStandardURLSchemes = 5;
+#endif
+static const url::SchemeWithType kChromeStandardURLSchemes[
+ kNumChromeStandardURLSchemes] = {
+ {extensions::kExtensionScheme, url::SCHEME_WITHOUT_PORT},
+ {chrome::kChromeNativeScheme, url::SCHEME_WITHOUT_PORT},
+ {extensions::kExtensionResourceScheme, url::SCHEME_WITHOUT_PORT},
+ {chrome::kChromeSearchScheme, url::SCHEME_WITHOUT_PORT},
+ {dom_distiller::kDomDistillerScheme, url::SCHEME_WITHOUT_PORT},
+#if defined(OS_CHROMEOS)
+ {chrome::kCrosScheme, url::SCHEME_WITHOUT_PORT},
+#endif
+};
+
void ChromeContentClient::AddAdditionalSchemes(
- std::vector<std::string>* standard_schemes,
+ std::vector<url::SchemeWithType>* standard_schemes,
std::vector<std::string>* savable_schemes) {
- standard_schemes->push_back(extensions::kExtensionScheme);
+ for (int i = 0; i < kNumChromeStandardURLSchemes; i++)
+ standard_schemes->push_back(kChromeStandardURLSchemes[i]);
+
savable_schemes->push_back(extensions::kExtensionScheme);
- standard_schemes->push_back(chrome::kChromeNativeScheme);
- standard_schemes->push_back(extensions::kExtensionResourceScheme);
savable_schemes->push_back(extensions::kExtensionResourceScheme);
- standard_schemes->push_back(chrome::kChromeSearchScheme);
savable_schemes->push_back(chrome::kChromeSearchScheme);
- standard_schemes->push_back(dom_distiller::kDomDistillerScheme);
savable_schemes->push_back(dom_distiller::kDomDistillerScheme);
-#if defined(OS_CHROMEOS)
- standard_schemes->push_back(chrome::kCrosScheme);
-#endif
}
std::string ChromeContentClient::GetProduct() const {
« no previous file with comments | « chrome/common/chrome_content_client.h ('k') | chrome/common/chrome_content_client_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698