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

Unified Diff: content/public/browser/resource_dispatcher_host.h

Issue 2182633007: Avoid using ContentBrowserClient::IsIllegalOrigin in ResourceDispatcherHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile errors Created 4 years, 5 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
Index: content/public/browser/resource_dispatcher_host.h
diff --git a/content/public/browser/resource_dispatcher_host.h b/content/public/browser/resource_dispatcher_host.h
index 3bdd0cae132f4bb9dbd61c3066db169bf5e1bbf0..51f3612ec9383a9e2c663aa8e9f75367d1011e52 100644
--- a/content/public/browser/resource_dispatcher_host.h
+++ b/content/public/browser/resource_dispatcher_host.h
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <memory>
+#include <string>
#include "base/callback_forward.h"
#include "content/common/content_export.h"
@@ -51,6 +52,25 @@ class CONTENT_EXPORT ResourceDispatcherHost {
// Clears the ResourceDispatcherHostLoginDelegate associated with the request.
virtual void ClearLoginDelegateForRequest(net::URLRequest* request) = 0;
+ // Specifies a scheme to be access checked. By default all schemes are
+ // allowed
Charlie Reis 2016/08/02 20:41:42 nit: End with period. Also clarify what access ch
ananta 2016/08/02 22:28:28 Done.
+ virtual void AddSchemeForAccessCheck(const std::string& scheme) = 0;
+
+ // The following two methods add access information for the url origin
+ // passed in. Please note that the scheme has to be registered for access
+ // check via a call to the AddSchemeForAccessCheck() method above.
+
+ // Adds |process_id| to the list of processes allowed to access the |origin|.
+ virtual void AddProcessForOrigin(const ResourceContext* context,
+ const std::string& origin,
+ int process_id) = 0;
+
+ // Removes |process_id| from the list of processes allowed to access the
+ // |origin|.
+ virtual void RemoveProcessForOrigin(const ResourceContext* context,
+ const std::string& origin,
+ int process_id) = 0;
+
protected:
virtual ~ResourceDispatcherHost() {}
};

Powered by Google App Engine
This is Rietveld 408576698