| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "ios/web/public/web_state/web_state_policy_decider.h" | 5 #import "ios/web/public/web_state/web_state_policy_decider.h" |
| 6 | 6 |
| 7 #import "ios/web/public/web_state/web_state.h" | 7 #import "ios/web/public/web_state/web_state.h" |
| 8 #import "ios/web/web_state/web_state_impl.h" | 8 #import "ios/web/web_state/web_state_impl.h" |
| 9 | 9 |
| 10 namespace web { | 10 namespace web { |
| 11 | 11 |
| 12 WebStatePolicyDecider::WebStatePolicyDecider(WebState* web_state) | 12 WebStatePolicyDecider::WebStatePolicyDecider(WebState* web_state) |
| 13 : web_state_(web_state) { | 13 : web_state_(web_state) { |
| 14 DCHECK(web_state_); | 14 DCHECK(web_state_); |
| 15 web_state_->AddPolicyDecider(this); | 15 web_state_->AddPolicyDecider(this); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 28 bool WebStatePolicyDecider::ShouldAllowResponse(NSURLResponse* response) { | 28 bool WebStatePolicyDecider::ShouldAllowResponse(NSURLResponse* response) { |
| 29 return true; | 29 return true; |
| 30 } | 30 } |
| 31 | 31 |
| 32 void WebStatePolicyDecider::ResetWebState() { | 32 void WebStatePolicyDecider::ResetWebState() { |
| 33 web_state_->RemovePolicyDecider(this); | 33 web_state_->RemovePolicyDecider(this); |
| 34 web_state_ = nullptr; | 34 web_state_ = nullptr; |
| 35 } | 35 } |
| 36 | 36 |
| 37 } // namespace web | 37 } // namespace web |
| OLD | NEW |