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

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

Issue 101573003: Add the navigation redirect-chain to Sync sessions proto for offline analysis. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments. Created 6 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
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 "content/browser/frame_host/frame_tree.h" 8 #include "content/browser/frame_host/frame_tree.h"
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/navigation_controller_impl.h" 10 #include "content/browser/frame_host/navigation_controller_impl.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // Avoid downloading when in view-source mode. 98 // Avoid downloading when in view-source mode.
99 params->allow_download = !entry.IsViewSourceMode(); 99 params->allow_download = !entry.IsViewSourceMode();
100 params->is_post = entry.GetHasPostData(); 100 params->is_post = entry.GetHasPostData();
101 if (entry.GetBrowserInitiatedPostData()) { 101 if (entry.GetBrowserInitiatedPostData()) {
102 params->browser_initiated_post_data.assign( 102 params->browser_initiated_post_data.assign(
103 entry.GetBrowserInitiatedPostData()->front(), 103 entry.GetBrowserInitiatedPostData()->front(),
104 entry.GetBrowserInitiatedPostData()->front() + 104 entry.GetBrowserInitiatedPostData()->front() +
105 entry.GetBrowserInitiatedPostData()->size()); 105 entry.GetBrowserInitiatedPostData()->size());
106 } 106 }
107 107
108 params->redirects = entry.redirect_chain(); 108 params->redirects = entry.GetRedirectChain();
109 109
110 params->can_load_local_resources = entry.GetCanLoadLocalResources(); 110 params->can_load_local_resources = entry.GetCanLoadLocalResources();
111 params->frame_to_navigate = entry.GetFrameToNavigate(); 111 params->frame_to_navigate = entry.GetFrameToNavigate();
112 } 112 }
113 113
114 } // namespace 114 } // namespace
115 115
116 116
117 NavigatorImpl::NavigatorImpl( 117 NavigatorImpl::NavigatorImpl(
118 NavigationControllerImpl* navigation_controller, 118 NavigationControllerImpl* navigation_controller,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 controller_->GetBrowserContext())); 161 controller_->GetBrowserContext()));
162 entry->set_site_instance( 162 entry->set_site_instance(
163 static_cast<SiteInstanceImpl*>( 163 static_cast<SiteInstanceImpl*>(
164 render_frame_host->render_view_host()->GetSiteInstance())); 164 render_frame_host->render_view_host()->GetSiteInstance()));
165 // TODO(creis): If there's a pending entry already, find a safe way to 165 // TODO(creis): If there's a pending entry already, find a safe way to
166 // update it instead of replacing it and copying over things like this. 166 // update it instead of replacing it and copying over things like this.
167 if (pending_entry) { 167 if (pending_entry) {
168 entry->set_transferred_global_request_id( 168 entry->set_transferred_global_request_id(
169 pending_entry->transferred_global_request_id()); 169 pending_entry->transferred_global_request_id());
170 entry->set_should_replace_entry(pending_entry->should_replace_entry()); 170 entry->set_should_replace_entry(pending_entry->should_replace_entry());
171 entry->set_redirect_chain(pending_entry->redirect_chain()); 171 entry->SetRedirectChain(pending_entry->GetRedirectChain());
172 } 172 }
173 controller_->SetPendingEntry(entry); 173 controller_->SetPendingEntry(entry);
174 if (delegate_) 174 if (delegate_)
175 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); 175 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL);
176 } 176 }
177 } 177 }
178 178
179 if (delegate_) { 179 if (delegate_) {
180 // Notify the observer about the start of the provisional load. 180 // Notify the observer about the start of the provisional load.
181 delegate_->DidStartProvisionalLoad( 181 delegate_->DidStartProvisionalLoad(
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 // still be used for a normal web site. 527 // still be used for a normal web site.
528 if (url == GURL(kAboutBlankURL)) 528 if (url == GURL(kAboutBlankURL))
529 return false; 529 return false;
530 530
531 // The embedder will then have the opportunity to determine if the URL 531 // The embedder will then have the opportunity to determine if the URL
532 // should "use up" the SiteInstance. 532 // should "use up" the SiteInstance.
533 return GetContentClient()->browser()->ShouldAssignSiteForURL(url); 533 return GetContentClient()->browser()->ShouldAssignSiteForURL(url);
534 } 534 }
535 535
536 } // namespace content 536 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698