forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Report COEP errors for resource loads and navigations
This CL adds specific error reason reporting for resources that get blocked due to COEP errors. Blocking either occurs in a URLLoader or in a NavigationRequest. The error is plumbed to the DevTools front-end, which should help developers identify and fix COEP issues. Note that this CL does not address CORB blocked fetches, so DevTools will report a plain failure if those get blocked. Bug: chromium:1051473 Change-Id: Idad0d1669d0f45a7116419e1935feb0bb9973e91 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2070409 Reviewed-by: Camille Lamy <clamy@chromium.org> Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Mike West <mkwst@chromium.org> Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#745916}
- Loading branch information
1 parent
370ebe2
commit f2a0495
Showing
24 changed files
with
298 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright 2020 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef SERVICES_NETWORK_PUBLIC_CPP_BLOCKED_BY_RESPONSE_REASON_H_ | ||
#define SERVICES_NETWORK_PUBLIC_CPP_BLOCKED_BY_RESPONSE_REASON_H_ | ||
|
||
namespace network { | ||
|
||
// This enum is used by to communicate the reason a request was blocked from | ||
// the network service to the browser. The blocking reasons pertain to | ||
// security features such as CORP, COEP, and COOP. | ||
enum class BlockedByResponseReason : int { | ||
kCoepFrameResourceNeedsCoepHeader, | ||
kCoopSandboxedIFrameCannotNavigateToCoopPage, | ||
kCorpNotSameOrigin, | ||
kCorpNotSameOriginAfterDefaultedToSameOriginByCoep, | ||
kCorpNotSameSite, | ||
// `kMaxValue` needs be assigned to the max value in the enum. | ||
kMaxValue = kCorpNotSameSite, | ||
}; | ||
|
||
} // namespace network | ||
|
||
#endif // SERVICES_NETWORK_PUBLIC_CPP_BLOCKED_BY_RESPONSE_REASON_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.