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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.h

Issue 2067493003: Moving (Can|Grant)AccessFilesOfPageState into RenderFrameHostImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@grant-file-access-after-transfer
Patch Set: Pulling in some changes that got removed from the dependent CL. Created 4 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 bool CanCommitOrigin(const url::Origin& origin, const GURL& url); 725 bool CanCommitOrigin(const url::Origin& origin, const GURL& url);
726 726
727 // Asserts that the given RenderFrameHostImpl is part of the same browser 727 // Asserts that the given RenderFrameHostImpl is part of the same browser
728 // context (and crashes if not), then returns whether the given frame is 728 // context (and crashes if not), then returns whether the given frame is
729 // part of the same site instance. 729 // part of the same site instance.
730 bool IsSameSiteInstance(RenderFrameHostImpl* other_render_frame_host); 730 bool IsSameSiteInstance(RenderFrameHostImpl* other_render_frame_host);
731 731
732 // Informs the content client that geolocation permissions were used. 732 // Informs the content client that geolocation permissions were used.
733 void DidUseGeolocationPermission(); 733 void DidUseGeolocationPermission();
734 734
735 // Returns whether the current RenderProcessHost has read access to all the
736 // files reported in |state|.
737 bool CanAccessFilesOfPageState(const PageState& state);
738
739 // Grants the current RenderProcessHost read access to any file listed in
740 // |validated_state|. It is important that the PageState has been validated
741 // upon receipt from the renderer process to prevent it from forging access to
742 // files without the user's consent.
743 void GrantFileAccessFromPageState(const PageState& validated_state);
744
735 // Grants the current RenderProcessHost read access to any file listed in 745 // Grants the current RenderProcessHost read access to any file listed in
736 // |body|. It is important that the ResourceRequestBody has been validated 746 // |body|. It is important that the ResourceRequestBody has been validated
737 // upon receipt from the renderer process to prevent it from forging access to 747 // upon receipt from the renderer process to prevent it from forging access to
738 // files without the user's consent. 748 // files without the user's consent.
739 void GrantFileAccessFromResourceRequestBody( 749 void GrantFileAccessFromResourceRequestBody(
740 const ResourceRequestBodyImpl& body); 750 const ResourceRequestBodyImpl& body);
741 751
742 void UpdatePermissionsForNavigation( 752 void UpdatePermissionsForNavigation(
743 const CommonNavigationParams& common_params, 753 const CommonNavigationParams& common_params,
744 const RequestNavigationParams& request_params); 754 const RequestNavigationParams& request_params);
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 1021
1012 // NOTE: This must be the last member. 1022 // NOTE: This must be the last member.
1013 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; 1023 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_;
1014 1024
1015 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 1025 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
1016 }; 1026 };
1017 1027
1018 } // namespace content 1028 } // namespace content
1019 1029
1020 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 1030 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698