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

Side by Side Diff: content/browser/frame_host/navigation_handle_impl.cc

Issue 1681703002: Update NavigationHandleImpl#GetResponseHeaders method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@template-url-prototcol
Patch Set: Updated a comment. Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « content/browser/frame_host/navigation_handle_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "content/browser/frame_host/frame_tree_node.h" 9 #include "content/browser/frame_host/frame_tree_node.h"
10 #include "content/browser/frame_host/navigator.h" 10 #include "content/browser/frame_host/navigator.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 } 126 }
127 127
128 bool NavigationHandleImpl::IsSamePage() { 128 bool NavigationHandleImpl::IsSamePage() {
129 DCHECK(state_ == DID_COMMIT || state_ == DID_COMMIT_ERROR_PAGE) 129 DCHECK(state_ == DID_COMMIT || state_ == DID_COMMIT_ERROR_PAGE)
130 << "This accessor should not be called before the navigation has " 130 << "This accessor should not be called before the navigation has "
131 "committed."; 131 "committed.";
132 return is_same_page_; 132 return is_same_page_;
133 } 133 }
134 134
135 const net::HttpResponseHeaders* NavigationHandleImpl::GetResponseHeaders() { 135 const net::HttpResponseHeaders* NavigationHandleImpl::GetResponseHeaders() {
136 DCHECK(state_ >= WILL_REDIRECT_REQUEST)
137 << "This accessor should only be called when the request encountered a "
138 "redirect or received a response";
139 return response_headers_.get(); 136 return response_headers_.get();
140 } 137 }
141 138
142 bool NavigationHandleImpl::HasCommitted() { 139 bool NavigationHandleImpl::HasCommitted() {
143 return state_ == DID_COMMIT || state_ == DID_COMMIT_ERROR_PAGE; 140 return state_ == DID_COMMIT || state_ == DID_COMMIT_ERROR_PAGE;
144 } 141 }
145 142
146 bool NavigationHandleImpl::IsErrorPage() { 143 bool NavigationHandleImpl::IsErrorPage() {
147 return state_ == DID_COMMIT_ERROR_PAGE; 144 return state_ == DID_COMMIT_ERROR_PAGE;
148 } 145 }
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 complete_callback_.Reset(); 442 complete_callback_.Reset();
446 443
447 if (!callback.is_null()) 444 if (!callback.is_null())
448 callback.Run(result); 445 callback.Run(result);
449 446
450 // No code after running the callback, as it might have resulted in our 447 // No code after running the callback, as it might have resulted in our
451 // destruction. 448 // destruction.
452 } 449 }
453 450
454 } // namespace content 451 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_handle_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698