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

Side by Side 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 failures Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_
6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <set>
11 12
12 #include "base/callback_forward.h" 13 #include "base/callback_forward.h"
13 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
14 15
15 namespace net { 16 namespace net {
16 class URLRequest; 17 class URLRequest;
17 } 18 }
18 19
19 namespace content { 20 namespace content {
20 21
(...skipping 23 matching lines...) Expand all
44 // delegate have a longer lifetime than the ResourceDispatcherHost. 45 // delegate have a longer lifetime than the ResourceDispatcherHost.
45 virtual void SetDelegate(ResourceDispatcherHostDelegate* delegate) = 0; 46 virtual void SetDelegate(ResourceDispatcherHostDelegate* delegate) = 0;
46 47
47 // Controls whether third-party sub-content can pop-up HTTP basic auth 48 // Controls whether third-party sub-content can pop-up HTTP basic auth
48 // dialog boxes. 49 // dialog boxes.
49 virtual void SetAllowCrossOriginAuthPrompt(bool value) = 0; 50 virtual void SetAllowCrossOriginAuthPrompt(bool value) = 0;
50 51
51 // Clears the ResourceDispatcherHostLoginDelegate associated with the request. 52 // Clears the ResourceDispatcherHostLoginDelegate associated with the request.
52 virtual void ClearLoginDelegateForRequest(net::URLRequest* request) = 0; 53 virtual void ClearLoginDelegateForRequest(net::URLRequest* request) = 0;
53 54
55 // Specifies a scheme to be access checked. By default all schemes are
56 // allowed
57 virtual void AddSchemeForAccessCheck(const std::string& scheme) = 0;
58
59 // The following six methods add access information for the url origin
60 // passed in. Please note that the scheme has to be registered for access
61 // check via a call to the AddSchemeForAccessCheck() method above.
62
63 // Adds access information for the url |origin|. By access we mean whether
64 // the process attempting to request resources off the |origin| is allowed to
65 // do so, etc.
66 virtual void AddOriginAccessInformation(const ResourceContext* context,
67 const std::string& origin) = 0;
68
69 // Removes access information for the url |origin| passed in.
70 virtual void RemoveOriginAccessInformation(const ResourceContext* context,
71 const std::string& origin) = 0;
72
73 // Adds |owner_process_id| as an owner for the |origin|.
74 virtual void AddOwnerForOrigin(const ResourceContext* context,
75 const std::string& origin,
76 int owner_process_id) = 0;
77
78 // Removes |owner_process_id| as an owner for the |origin|.
79 virtual void RemoveOwnerForOrigin(const ResourceContext* context,
80 const std::string& origin,
81 int owner_process_id) = 0;
82
83 // Adds the |guest_process_id| to the list of processes allowed to access the
84 // origin.
85 virtual void AddGuestForOrigin(const ResourceContext* context,
jam 2016/08/01 20:06:01 from the loading perspective, there's no need to d
ananta 2016/08/02 00:40:50 Done.
86 const std::string& origin,
87 int guest_process_id) = 0;
88
89 // Removes the |guest_process_id| from the list of processes allowed to
90 // access the origin.
91 virtual void RemoveGuestForOrigin(const ResourceContext* context,
92 const std::string& origin,
93 int guest_process_id) = 0;
94
54 protected: 95 protected:
55 virtual ~ResourceDispatcherHost() {} 96 virtual ~ResourceDispatcherHost() {}
56 }; 97 };
57 98
58 } // namespace content 99 } // namespace content
59 100
60 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_ 101 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698