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

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

Issue 2745033002: Fix LoadDataWithBaseUrlTest#testloadDataWithBaseUrlCallsOnPageStarted with PlzNavigate. (Closed)
Patch Set: fix unittest Created 3 years, 9 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 <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 1168
1169 frame_tree_node->CreatedNavigationRequest(std::move(scoped_request)); 1169 frame_tree_node->CreatedNavigationRequest(std::move(scoped_request));
1170 1170
1171 frame_tree_node->navigation_request()->CreateNavigationHandle( 1171 frame_tree_node->navigation_request()->CreateNavigationHandle(
1172 entry.GetUniqueID()); 1172 entry.GetUniqueID());
1173 1173
1174 NavigationRequest* navigation_request = frame_tree_node->navigation_request(); 1174 NavigationRequest* navigation_request = frame_tree_node->navigation_request();
1175 if (!navigation_request) 1175 if (!navigation_request)
1176 return; // Navigation was synchronously stopped. 1176 return; // Navigation was synchronously stopped.
1177 1177
1178 navigation_request->navigation_handle()->set_base_url_for_data_url(
1179 entry.GetBaseURLForDataURL());
1180
1178 // Have the current renderer execute its beforeunload event if needed. If it 1181 // Have the current renderer execute its beforeunload event if needed. If it
1179 // is not needed then NavigationRequest::BeginNavigation should be directly 1182 // is not needed then NavigationRequest::BeginNavigation should be directly
1180 // called instead. 1183 // called instead.
1181 if (should_dispatch_beforeunload && !IsRendererDebugURL(dest_url)) { 1184 if (should_dispatch_beforeunload && !IsRendererDebugURL(dest_url)) {
1182 navigation_request->SetWaitingForRendererResponse(); 1185 navigation_request->SetWaitingForRendererResponse();
1183 frame_tree_node->current_frame_host()->DispatchBeforeUnload( 1186 frame_tree_node->current_frame_host()->DispatchBeforeUnload(
1184 true, reload_type != ReloadType::NONE); 1187 true, reload_type != ReloadType::NONE);
1185 } else { 1188 } else {
1186 navigation_request->BeginNavigation(); 1189 navigation_request->BeginNavigation();
1187 } 1190 }
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 if (navigation_handle) 1291 if (navigation_handle)
1289 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); 1292 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID());
1290 1293
1291 controller_->SetPendingEntry(std::move(entry)); 1294 controller_->SetPendingEntry(std::move(entry));
1292 if (delegate_) 1295 if (delegate_)
1293 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); 1296 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL);
1294 } 1297 }
1295 } 1298 }
1296 1299
1297 } // namespace content 1300 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_handle_impl.cc ('k') | content/public/browser/navigation_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698