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

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

Issue 1269813002: Add a NavigationThrottle to the public content/ interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation-api
Patch Set: Created 5 years, 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/navigator_impl.h" 5 #include "content/browser/frame_host/navigator_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/browser/frame_host/frame_tree.h" 10 #include "content/browser/frame_host/frame_tree.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 render_frame_host->navigation_handle()->set_is_transferring(false); 151 render_frame_host->navigation_handle()->set_is_transferring(false);
152 return; 152 return;
153 } 153 }
154 154
155 // This ensures that notifications about the end of the previous 155 // This ensures that notifications about the end of the previous
156 // navigation are sent before notifications about the start of the 156 // navigation are sent before notifications about the start of the
157 // new navigation. 157 // new navigation.
158 render_frame_host->SetNavigationHandle(scoped_ptr<NavigationHandleImpl>()); 158 render_frame_host->SetNavigationHandle(scoped_ptr<NavigationHandleImpl>());
159 } 159 }
160 160
161 render_frame_host->SetNavigationHandle( 161 GURL filtered_url = url;
162 NavigationHandleImpl::Create(url, is_main_frame, delegate_)); 162 render_frame_host->GetProcess()->FilterURL(false, &filtered_url);
163 render_frame_host->SetNavigationHandle(NavigationHandleImpl::Create(
164 url, filtered_url, is_main_frame, delegate_));
nasko 2015/08/31 23:25:15 Why do we need both? We never keep the two around
clamy 2015/09/03 15:30:51 We need to provide the filtered url to the throttl
nasko 2015/09/04 23:36:49 Where do we do those checks? Why can't we frontloa
163 } 165 }
164 166
165 void NavigatorImpl::DidFailProvisionalLoadWithError( 167 void NavigatorImpl::DidFailProvisionalLoadWithError(
166 RenderFrameHostImpl* render_frame_host, 168 RenderFrameHostImpl* render_frame_host,
167 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) { 169 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) {
168 VLOG(1) << "Failed Provisional Load: " << params.url.possibly_invalid_spec() 170 VLOG(1) << "Failed Provisional Load: " << params.url.possibly_invalid_spec()
169 << ", error_code: " << params.error_code 171 << ", error_code: " << params.error_code
170 << ", error_description: " << params.error_description 172 << ", error_description: " << params.error_description
171 << ", showing_repost_interstitial: " << 173 << ", showing_repost_interstitial: " <<
172 params.showing_repost_interstitial 174 params.showing_repost_interstitial
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 entry->set_should_replace_entry(pending_entry->should_replace_entry()); 945 entry->set_should_replace_entry(pending_entry->should_replace_entry());
944 entry->SetRedirectChain(pending_entry->GetRedirectChain()); 946 entry->SetRedirectChain(pending_entry->GetRedirectChain());
945 } 947 }
946 controller_->SetPendingEntry(entry.Pass()); 948 controller_->SetPendingEntry(entry.Pass());
947 if (delegate_) 949 if (delegate_)
948 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); 950 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL);
949 } 951 }
950 } 952 }
951 953
952 } // namespace content 954 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698