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

Unified Diff: extensions/shell/common/shell_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 | « extensions/shell/common/shell_content_client.h ('k') | extensions/test/extensions_unittests_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/shell/common/shell_content_client.cc
diff --git a/extensions/shell/common/shell_content_client.cc b/extensions/shell/common/shell_content_client.cc
index 1879a8f6e447b753b8e9bae981d81699188c9f6a..946fe838192cfc3795c5138079f4c6ffbc5266a7 100644
--- a/extensions/shell/common/shell_content_client.cc
+++ b/extensions/shell/common/shell_content_client.cc
@@ -74,12 +74,20 @@ void ShellContentClient::AddPepperPlugins(
#endif // !defined(DISABLE_NACL)
}
+static const int kNumShellStandardURLSchemes = 2;
+static const url::SchemeWithType kShellStandardURLSchemes[
+ kNumShellStandardURLSchemes] = {
+ {extensions::kExtensionScheme, url::SCHEME_WITHOUT_PORT},
+ {extensions::kExtensionResourceScheme, url::SCHEME_WITHOUT_PORT},
+};
+
void ShellContentClient::AddAdditionalSchemes(
- std::vector<std::string>* standard_schemes,
+ std::vector<url::SchemeWithType>* standard_schemes,
std::vector<std::string>* savable_schemes) {
- standard_schemes->push_back(kExtensionScheme);
+ for (int i = 0; i < kNumShellStandardURLSchemes; i++)
+ standard_schemes->push_back(kShellStandardURLSchemes[i]);
+
savable_schemes->push_back(kExtensionScheme);
- standard_schemes->push_back(kExtensionResourceScheme);
savable_schemes->push_back(kExtensionResourceScheme);
}
« no previous file with comments | « extensions/shell/common/shell_content_client.h ('k') | extensions/test/extensions_unittests_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698