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

Unified Diff: content/public/browser/navigation_throttle.cc

Issue 2867833002: NavigationThrottle: allow customization of net::Error when blocking
Patch Set: Rebase Created 3 years, 7 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/public/browser/navigation_throttle.h ('k') | content/public/test/navigation_simulator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/navigation_throttle.cc
diff --git a/content/public/browser/navigation_throttle.cc b/content/public/browser/navigation_throttle.cc
index 5c795d655d2c63bd4f6d9f465553cf66f881d6bf..42828911059df50ab5abbfd8b58285ffd49b09be 100644
--- a/content/public/browser/navigation_throttle.cc
+++ b/content/public/browser/navigation_throttle.cc
@@ -6,6 +6,20 @@
namespace content {
+static_assert(sizeof(NavigationThrottle::ThrottleCheckResult) == 4,
+ "ThrottleCheckResult is meant to be a 32-bit value");
+
+bool NavigationThrottle::ThrottleCheckResult::operator==(
+ const NavigationThrottle::ThrottleCheckResult& rhs) const {
+ return (this->action_ == rhs.action_) &&
+ (this->net_error_code_ == rhs.net_error_code_);
+}
+
+bool NavigationThrottle::ThrottleCheckResult::operator!=(
+ const NavigationThrottle::ThrottleCheckResult& rhs) const {
+ return !(*this == rhs);
+}
+
NavigationThrottle::NavigationThrottle(NavigationHandle* navigation_handle)
: navigation_handle_(navigation_handle) {}
« no previous file with comments | « content/public/browser/navigation_throttle.h ('k') | content/public/test/navigation_simulator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698