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

Unified Diff: chrome/browser/chrome_content_browser_client.h

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 | « no previous file | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.h
diff --git a/chrome/browser/chrome_content_browser_client.h b/chrome/browser/chrome_content_browser_client.h
index a4638e8156b55cf13b1d5d1241d3fe77bf15ad0e..56ad00734f702e34c5deeee8f0f518b68820594e 100644
--- a/chrome/browser/chrome_content_browser_client.h
+++ b/chrome/browser/chrome_content_browser_client.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_
#pragma once
+#include <set>
#include <string>
#include "base/compiler_specific.h"
@@ -15,6 +16,9 @@ namespace chrome {
class ChromeContentBrowserClient : public content::ContentBrowserClient {
public:
+ ChromeContentBrowserClient();
+ virtual ~ChromeContentBrowserClient();
+
virtual content::BrowserMainParts* CreateBrowserMainParts(
const content::MainFunctionParams& parameters) OVERRIDE;
virtual content::WebContentsView* CreateWebContentsView(
@@ -141,6 +145,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
virtual void ClearCookies(RenderViewHost* rvh) OVERRIDE;
virtual FilePath GetDefaultDownloadDirectory() OVERRIDE;
virtual std::string GetDefaultDownloadName() OVERRIDE;
+ virtual bool AllowSocketAPI(const GURL& url) OVERRIDE;
#if defined(OS_POSIX) && !defined(OS_MACOSX)
virtual int GetCrashSignalFD(const CommandLine& command_line) OVERRIDE;
@@ -153,6 +158,12 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate(
const GURL& url) OVERRIDE;
#endif
+
+ private:
+ // Set of origins that can use TCP/UDP private APIs from NaCl.
+ std::set<std::string> allowed_socket_origins_;
+
+ DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient);
};
} // namespace chrome
« no previous file with comments | « no previous file | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698