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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 511263002: Don’t reset the page id when the browser takes the navigation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« 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 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/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 3471 matching lines...) Expand 10 before | Expand all | Expand 10 after
3482 .browser_handles_non_local_top_level_requests 3482 .browser_handles_non_local_top_level_requests
3483 && IsNonLocalTopLevelNavigation(url, info.frame, info.navigationType, 3483 && IsNonLocalTopLevelNavigation(url, info.frame, info.navigationType,
3484 is_form_post); 3484 is_form_post);
3485 if (!browser_handles_request) { 3485 if (!browser_handles_request) {
3486 browser_handles_request = IsTopLevelNavigation(info.frame) && 3486 browser_handles_request = IsTopLevelNavigation(info.frame) &&
3487 render_view_->renderer_preferences_ 3487 render_view_->renderer_preferences_
3488 .browser_handles_all_top_level_requests; 3488 .browser_handles_all_top_level_requests;
3489 } 3489 }
3490 3490
3491 if (browser_handles_request) { 3491 if (browser_handles_request) {
3492 // Reset these counters as the RenderView could be reused for the next
3493 // navigation.
3494 render_view_->page_id_ = -1;
3495 render_view_->last_page_id_sent_to_browser_ = -1;
3496 OpenURL(info.frame, url, referrer, info.defaultPolicy); 3492 OpenURL(info.frame, url, referrer, info.defaultPolicy);
3497 return blink::WebNavigationPolicyIgnore; // Suppress the load here. 3493 return blink::WebNavigationPolicyIgnore; // Suppress the load here.
3498 } 3494 }
3499 } 3495 }
3500 3496
3501 // Use the frame's original request's URL rather than the document's URL for 3497 // Use the frame's original request's URL rather than the document's URL for
3502 // subsequent checks. For a popup, the document's URL may become the opener 3498 // subsequent checks. For a popup, the document's URL may become the opener
3503 // window's URL if the opener has called document.write(). 3499 // window's URL if the opener has called document.write().
3504 // See http://crbug.com/93517. 3500 // See http://crbug.com/93517.
3505 GURL old_url(info.frame->dataSource()->request().url()); 3501 GURL old_url(info.frame->dataSource()->request().url());
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
3820 3816
3821 #if defined(ENABLE_BROWSER_CDMS) 3817 #if defined(ENABLE_BROWSER_CDMS)
3822 RendererCdmManager* RenderFrameImpl::GetCdmManager() { 3818 RendererCdmManager* RenderFrameImpl::GetCdmManager() {
3823 if (!cdm_manager_) 3819 if (!cdm_manager_)
3824 cdm_manager_ = new RendererCdmManager(this); 3820 cdm_manager_ = new RendererCdmManager(this);
3825 return cdm_manager_; 3821 return cdm_manager_;
3826 } 3822 }
3827 #endif // defined(ENABLE_BROWSER_CDMS) 3823 #endif // defined(ENABLE_BROWSER_CDMS)
3828 3824
3829 } // namespace content 3825 } // namespace content
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