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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 9379002: Move socket API restriction check to browser process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 10 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/renderer/chrome_content_renderer_client.h ('k') | content/browser/mock_content_browser_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index 66a774431ebd630b7ad8febc8c48968c41266a1d..6c7f87b7e635ba01fec542c578f373375f44c6a8 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -106,11 +106,6 @@ using content::RenderThread;
namespace {
-const char* kPredefinedAllowedSocketOrigins[] = {
- "okddffdblfhhnmhodogpojmfkjmhinfp", // Test SSH Client
- "pnhechapfaindjhompbnflcldabbghjo" // HTerm App (SSH Client)
-};
-
static void AppendParams(const std::vector<string16>& additional_names,
const std::vector<string16>& additional_values,
WebVector<WebString>* existing_names,
@@ -143,18 +138,6 @@ static void AppendParams(const std::vector<string16>& additional_names,
namespace chrome {
ChromeContentRendererClient::ChromeContentRendererClient() {
- for (size_t i = 0; i < arraysize(kPredefinedAllowedSocketOrigins); ++i)
- allowed_socket_origins_.insert(kPredefinedAllowedSocketOrigins[i]);
-
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- std::string allowed_list =
- command_line.GetSwitchValueASCII(switches::kAllowNaClSocketAPI);
- if (!allowed_list.empty()) {
- StringTokenizer t(allowed_list, ",");
- while (t.GetNext()) {
- allowed_socket_origins_.insert(t.token());
- }
- }
}
ChromeContentRendererClient::~ChromeContentRendererClient() {
@@ -861,9 +844,4 @@ void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories(
factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory);
}
-bool ChromeContentRendererClient::AllowSocketAPI(const GURL& url) {
- return allowed_socket_origins_.find(url.host()) !=
- allowed_socket_origins_.end();
-}
-
} // namespace chrome
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.h ('k') | content/browser/mock_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698