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

Unified Diff: content/common/navigation_params.h

Issue 2655463006: PlzNavigate: Enforce 'frame-src' CSP on the browser. (Closed)
Patch Set: Rebase. Created 3 years, 9 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 | « content/common/frame_messages.h ('k') | content/common/navigation_params.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/navigation_params.h
diff --git a/content/common/navigation_params.h b/content/common/navigation_params.h
index fe8c71a797833bdd8539ef9ba92da9eaec214f44..c23cada787c82d75e9f1d9837b14ceb52fcb81ac 100644
--- a/content/common/navigation_params.h
+++ b/content/common/navigation_params.h
@@ -15,6 +15,7 @@
#include "base/time/time.h"
#include "build/build_config.h"
#include "content/common/content_export.h"
+#include "content/common/content_security_policy/csp_disposition_enum.h"
#include "content/common/frame_message_enums.h"
#include "content/common/resource_request_body_impl.h"
#include "content/public/common/page_state.h"
@@ -75,7 +76,8 @@ struct CONTENT_EXPORT CommonNavigationParams {
const base::TimeTicks& navigation_start,
std::string method,
const scoped_refptr<ResourceRequestBodyImpl>& post_data,
- base::Optional<SourceLocation> source_location);
+ base::Optional<SourceLocation> source_location,
+ CSPDisposition should_check_main_world_csp);
CommonNavigationParams(const CommonNavigationParams& other);
~CommonNavigationParams();
@@ -140,9 +142,17 @@ struct CONTENT_EXPORT CommonNavigationParams {
// PlzNavigate
// Information about the Javascript source for this navigation. Used for
// providing information in console error messages triggered by the
- // navigation. If the navigation was not caused by Javascript, this should not
- // be set.
+ // navigation. If the navigation was not caused by Javascript, this should
+ // not be set.
base::Optional<SourceLocation> source_location;
+
+ // Whether or not the CSP of the main world should apply. When the navigation
+ // is initiated from a content script in an isolated world, the CSP defined
+ // in the main world should not apply.
+ // TODO(arthursonzogni): Instead of this boolean, the origin of the isolated
+ // world which has initiated the navigation should be passed.
+ // See https://crbug.com/702540
+ CSPDisposition should_check_main_world_csp;
};
// Provided by the renderer ----------------------------------------------------
« no previous file with comments | « content/common/frame_messages.h ('k') | content/common/navigation_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698