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

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

Issue 2494633004: Remove about:srcdoc url conversion. (Closed)
Patch Set: Rebase Created 4 years 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
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 "base/debug/dump_without_crashing.h" 7 #include "base/debug/dump_without_crashing.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "content/browser/browsing_data/clear_site_data_throttle.h" 9 #include "content/browser/browsing_data/clear_site_data_throttle.h"
10 #include "content/browser/child_process_security_policy_impl.h" 10 #include "content/browser/child_process_security_policy_impl.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 } 46 }
47 47
48 } // namespace 48 } // namespace
49 49
50 // static 50 // static
51 std::unique_ptr<NavigationHandleImpl> NavigationHandleImpl::Create( 51 std::unique_ptr<NavigationHandleImpl> NavigationHandleImpl::Create(
52 const GURL& url, 52 const GURL& url,
53 FrameTreeNode* frame_tree_node, 53 FrameTreeNode* frame_tree_node,
54 bool is_renderer_initiated, 54 bool is_renderer_initiated,
55 bool is_same_page, 55 bool is_same_page,
56 bool is_srcdoc,
57 const base::TimeTicks& navigation_start, 56 const base::TimeTicks& navigation_start,
58 int pending_nav_entry_id, 57 int pending_nav_entry_id,
59 bool started_from_context_menu) { 58 bool started_from_context_menu) {
60 return std::unique_ptr<NavigationHandleImpl>(new NavigationHandleImpl( 59 return std::unique_ptr<NavigationHandleImpl>(new NavigationHandleImpl(
61 url, frame_tree_node, is_renderer_initiated, is_same_page, is_srcdoc, 60 url, frame_tree_node, is_renderer_initiated, is_same_page,
62 navigation_start, pending_nav_entry_id, started_from_context_menu)); 61 navigation_start, pending_nav_entry_id, started_from_context_menu));
63 } 62 }
64 63
65 NavigationHandleImpl::NavigationHandleImpl( 64 NavigationHandleImpl::NavigationHandleImpl(
66 const GURL& url, 65 const GURL& url,
67 FrameTreeNode* frame_tree_node, 66 FrameTreeNode* frame_tree_node,
68 bool is_renderer_initiated, 67 bool is_renderer_initiated,
69 bool is_same_page, 68 bool is_same_page,
70 bool is_srcdoc,
71 const base::TimeTicks& navigation_start, 69 const base::TimeTicks& navigation_start,
72 int pending_nav_entry_id, 70 int pending_nav_entry_id,
73 bool started_from_context_menu) 71 bool started_from_context_menu)
74 : url_(url), 72 : url_(url),
75 has_user_gesture_(false), 73 has_user_gesture_(false),
76 transition_(ui::PAGE_TRANSITION_LINK), 74 transition_(ui::PAGE_TRANSITION_LINK),
77 is_external_protocol_(false), 75 is_external_protocol_(false),
78 net_error_code_(net::OK), 76 net_error_code_(net::OK),
79 render_frame_host_(nullptr), 77 render_frame_host_(nullptr),
80 is_renderer_initiated_(is_renderer_initiated), 78 is_renderer_initiated_(is_renderer_initiated),
81 is_same_page_(is_same_page), 79 is_same_page_(is_same_page),
82 is_srcdoc_(is_srcdoc),
83 was_redirected_(false), 80 was_redirected_(false),
84 connection_info_(net::HttpResponseInfo::CONNECTION_INFO_UNKNOWN), 81 connection_info_(net::HttpResponseInfo::CONNECTION_INFO_UNKNOWN),
85 original_url_(url), 82 original_url_(url),
86 state_(INITIAL), 83 state_(INITIAL),
87 is_transferring_(false), 84 is_transferring_(false),
88 frame_tree_node_(frame_tree_node), 85 frame_tree_node_(frame_tree_node),
89 next_index_(0), 86 next_index_(0),
90 navigation_start_(navigation_start), 87 navigation_start_(navigation_start),
91 pending_nav_entry_id_(pending_nav_entry_id), 88 pending_nav_entry_id_(pending_nav_entry_id),
92 request_context_type_(REQUEST_CONTEXT_TYPE_UNSPECIFIED), 89 request_context_type_(REQUEST_CONTEXT_TYPE_UNSPECIFIED),
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 if (frame_tree_node_->parent()) 158 if (frame_tree_node_->parent())
162 return frame_tree_node_->parent()->IsMainFrame(); 159 return frame_tree_node_->parent()->IsMainFrame();
163 160
164 return false; 161 return false;
165 } 162 }
166 163
167 bool NavigationHandleImpl::IsRendererInitiated() { 164 bool NavigationHandleImpl::IsRendererInitiated() {
168 return is_renderer_initiated_; 165 return is_renderer_initiated_;
169 } 166 }
170 167
171 bool NavigationHandleImpl::IsSrcdoc() {
172 return is_srcdoc_;
173 }
174
175 bool NavigationHandleImpl::WasServerRedirect() { 168 bool NavigationHandleImpl::WasServerRedirect() {
176 return was_redirected_; 169 return was_redirected_;
177 } 170 }
178 171
179 int NavigationHandleImpl::GetFrameTreeNodeId() { 172 int NavigationHandleImpl::GetFrameTreeNodeId() {
180 return frame_tree_node_->frame_tree_node_id(); 173 return frame_tree_node_->frame_tree_node_id();
181 } 174 }
182 175
183 int NavigationHandleImpl::GetParentFrameTreeNodeId() { 176 int NavigationHandleImpl::GetParentFrameTreeNodeId() {
184 if (frame_tree_node_->IsMainFrame()) 177 if (frame_tree_node_->IsMainFrame())
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 throttles_to_register.push_back(std::move(clear_site_data_throttle)); 777 throttles_to_register.push_back(std::move(clear_site_data_throttle));
785 778
786 if (throttles_to_register.size() > 0) { 779 if (throttles_to_register.size() > 0) {
787 throttles_.insert(throttles_.begin(), throttles_to_register.begin(), 780 throttles_.insert(throttles_.begin(), throttles_to_register.begin(),
788 throttles_to_register.end()); 781 throttles_to_register.end());
789 throttles_to_register.weak_clear(); 782 throttles_to_register.weak_clear();
790 } 783 }
791 } 784 }
792 785
793 } // namespace content 786 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_handle_impl.h ('k') | content/browser/frame_host/navigation_handle_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698