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 "content/browser/frame_host/navigation_handle_impl.h" | 5 #include "content/browser/frame_host/navigation_handle_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "content/browser/browsing_data/clear_site_data_throttle.h" | 10 #include "content/browser/browsing_data/clear_site_data_throttle.h" |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 } | 214 } |
215 | 215 |
216 bool NavigationHandleImpl::IsSamePage() { | 216 bool NavigationHandleImpl::IsSamePage() { |
217 DCHECK(state_ == DID_COMMIT || state_ == DID_COMMIT_ERROR_PAGE) | 217 DCHECK(state_ == DID_COMMIT || state_ == DID_COMMIT_ERROR_PAGE) |
218 << "This accessor should not be called before the navigation has " | 218 << "This accessor should not be called before the navigation has " |
219 "committed."; | 219 "committed."; |
220 return is_same_page_; | 220 return is_same_page_; |
221 } | 221 } |
222 | 222 |
223 const net::HttpResponseHeaders* NavigationHandleImpl::GetResponseHeaders() { | 223 const net::HttpResponseHeaders* NavigationHandleImpl::GetResponseHeaders() { |
224 DCHECK_GE(state_, WILL_REDIRECT_REQUEST); | |
225 return response_headers_.get(); | 224 return response_headers_.get(); |
226 } | 225 } |
227 | 226 |
228 bool NavigationHandleImpl::HasCommitted() { | 227 bool NavigationHandleImpl::HasCommitted() { |
229 return state_ == DID_COMMIT || state_ == DID_COMMIT_ERROR_PAGE; | 228 return state_ == DID_COMMIT || state_ == DID_COMMIT_ERROR_PAGE; |
230 } | 229 } |
231 | 230 |
232 bool NavigationHandleImpl::IsErrorPage() { | 231 bool NavigationHandleImpl::IsErrorPage() { |
233 return state_ == DID_COMMIT_ERROR_PAGE; | 232 return state_ == DID_COMMIT_ERROR_PAGE; |
234 } | 233 } |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 throttles_to_register.end()); | 732 throttles_to_register.end()); |
734 throttles_to_register.weak_clear(); | 733 throttles_to_register.weak_clear(); |
735 } | 734 } |
736 } | 735 } |
737 | 736 |
738 bool NavigationHandleImpl::WasStartedFromContextMenu() const { | 737 bool NavigationHandleImpl::WasStartedFromContextMenu() const { |
739 return started_from_context_menu_; | 738 return started_from_context_menu_; |
740 } | 739 } |
741 | 740 |
742 } // namespace content | 741 } // namespace content |
OLD | NEW |