| OLD | NEW |
| 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.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 // Note also that we hide the referrer for Web UI pages. We don't really | 715 // Note also that we hide the referrer for Web UI pages. We don't really |
| 716 // want web sites to see a referrer of "chrome://blah" (and some | 716 // want web sites to see a referrer of "chrome://blah" (and some |
| 717 // chrome: URLs might have search terms or other stuff we don't want to | 717 // chrome: URLs might have search terms or other stuff we don't want to |
| 718 // send to the site), so we send no referrer. | 718 // send to the site), so we send no referrer. |
| 719 params.referrer = Referrer(); | 719 params.referrer = Referrer(); |
| 720 | 720 |
| 721 // Navigations in Web UI pages count as browser-initiated navigations. | 721 // Navigations in Web UI pages count as browser-initiated navigations. |
| 722 params.is_renderer_initiated = false; | 722 params.is_renderer_initiated = false; |
| 723 } | 723 } |
| 724 | 724 |
| 725 GetContentClient()->browser()->OverrideOpenURLParams(current_site_instance, |
| 726 ¶ms); |
| 727 |
| 725 if (delegate_) | 728 if (delegate_) |
| 726 delegate_->RequestOpenURL(render_frame_host, params); | 729 delegate_->RequestOpenURL(render_frame_host, params); |
| 727 } | 730 } |
| 728 | 731 |
| 729 void NavigatorImpl::RequestTransferURL( | 732 void NavigatorImpl::RequestTransferURL( |
| 730 RenderFrameHostImpl* render_frame_host, | 733 RenderFrameHostImpl* render_frame_host, |
| 731 const GURL& url, | 734 const GURL& url, |
| 732 SiteInstance* source_site_instance, | 735 SiteInstance* source_site_instance, |
| 733 const std::vector<GURL>& redirect_chain, | 736 const std::vector<GURL>& redirect_chain, |
| 734 const Referrer& referrer, | 737 const Referrer& referrer, |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1179 if (pending_entry != controller_->GetVisibleEntry() || | 1182 if (pending_entry != controller_->GetVisibleEntry() || |
| 1180 !should_preserve_entry) { | 1183 !should_preserve_entry) { |
| 1181 controller_->DiscardPendingEntry(true); | 1184 controller_->DiscardPendingEntry(true); |
| 1182 | 1185 |
| 1183 // Also force the UI to refresh. | 1186 // Also force the UI to refresh. |
| 1184 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); | 1187 controller_->delegate()->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); |
| 1185 } | 1188 } |
| 1186 } | 1189 } |
| 1187 | 1190 |
| 1188 } // namespace content | 1191 } // namespace content |
| OLD | NEW |