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

Side by Side Diff: content/browser/tab_contents/tab_contents.cc

Issue 6793029: Prevent changes to NavigationEntry's URL for a provisional redirect. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/tab_contents/tab_contents.h" 5 #include "content/browser/tab_contents/tab_contents.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after
1303 void TabContents::OnDidRedirectProvisionalLoad(int32 page_id, 1303 void TabContents::OnDidRedirectProvisionalLoad(int32 page_id,
1304 const GURL& source_url, 1304 const GURL& source_url,
1305 const GURL& target_url) { 1305 const GURL& target_url) {
1306 NavigationEntry* entry; 1306 NavigationEntry* entry;
1307 if (page_id == -1) 1307 if (page_id == -1)
1308 entry = controller_.pending_entry(); 1308 entry = controller_.pending_entry();
1309 else 1309 else
1310 entry = controller_.GetEntryWithPageID(GetSiteInstance(), page_id); 1310 entry = controller_.GetEntryWithPageID(GetSiteInstance(), page_id);
1311 if (!entry || entry->url() != source_url) 1311 if (!entry || entry->url() != source_url)
1312 return; 1312 return;
1313 entry->set_url(target_url);
1314 1313
1315 // Notify observers about the provisional change in the main frame URL. 1314 // Notify observers about the provisional change in the main frame URL.
1316 FOR_EACH_OBSERVER(TabContentsObserver, observers_, 1315 FOR_EACH_OBSERVER(TabContentsObserver, observers_,
1317 OnProvisionalChangeToMainFrameUrl(target_url)); 1316 OnProvisionalChangeToMainFrameUrl(target_url));
Charlie Reis 2011/04/05 00:17:51 Timo-- As Brett mentions on the bug, we'd like t
tburkard 2011/04/05 21:55:04 Calling us is def. important, same for the conditi
1318 } 1317 }
1319 1318
1320 void TabContents::OnDidFailProvisionalLoadWithError( 1319 void TabContents::OnDidFailProvisionalLoadWithError(
1321 int64 frame_id, 1320 int64 frame_id,
1322 bool is_main_frame, 1321 bool is_main_frame,
1323 int error_code, 1322 int error_code,
1324 const GURL& url, 1323 const GURL& url,
1325 bool showing_repost_interstitial) { 1324 bool showing_repost_interstitial) {
1326 VLOG(1) << "Failed Provisional Load: " << url.possibly_invalid_spec() 1325 VLOG(1) << "Failed Provisional Load: " << url.possibly_invalid_spec()
1327 << ", error_code: " << error_code 1326 << ", error_code: " << error_code
(...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after
2649 2648
2650 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 2649 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
2651 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); 2650 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh);
2652 rwh_view->SetSize(view()->GetContainerSize()); 2651 rwh_view->SetSize(view()->GetContainerSize());
2653 } 2652 }
2654 2653
2655 void TabContents::OnOnlineStateChanged(bool online) { 2654 void TabContents::OnOnlineStateChanged(bool online) {
2656 render_view_host()->Send(new ViewMsg_NetworkStateChanged( 2655 render_view_host()->Send(new ViewMsg_NetworkStateChanged(
2657 render_view_host()->routing_id(), online)); 2656 render_view_host()->routing_id(), online));
2658 } 2657 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698