Chromium Code Reviews| 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_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
| (...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 764 ui::PAGE_TRANSITION_LINK, | 764 ui::PAGE_TRANSITION_LINK, |
| 765 true /* is_renderer_initiated */); | 765 true /* is_renderer_initiated */); |
| 766 params.uses_post = uses_post; | 766 params.uses_post = uses_post; |
| 767 params.post_data = body; | 767 params.post_data = body; |
| 768 params.extra_headers = extra_headers; | 768 params.extra_headers = extra_headers; |
| 769 if (redirect_chain.size() > 0) | 769 if (redirect_chain.size() > 0) |
| 770 params.redirect_chain = redirect_chain; | 770 params.redirect_chain = redirect_chain; |
| 771 params.should_replace_current_entry = should_replace_current_entry; | 771 params.should_replace_current_entry = should_replace_current_entry; |
| 772 params.user_gesture = user_gesture; | 772 params.user_gesture = user_gesture; |
| 773 | 773 |
| 774 // RequestOpenURL is used only for local frames, so we can get here only if | |
| 775 // the navigation is initiated by a frame in the same SiteInstance as this | |
| 776 // frame. Note that navigations on RenderFrameProxies do not use | |
| 777 // RequestOpenURL and go through RequestTransferURL instead. | |
| 778 params.source_site_instance = current_site_instance; | |
|
Łukasz Anforowicz
2017/02/09 16:53:01
My initial fix was to never use params.source_site
alexmos
2017/02/09 22:58:36
Acknowledged.
| |
| 779 | |
| 780 if (render_frame_host->web_ui()) { | 774 if (render_frame_host->web_ui()) { |
| 781 // Note that we hide the referrer for Web UI pages. We don't really want | 775 // Note that we hide the referrer for Web UI pages. We don't really want |
| 782 // web sites to see a referrer of "chrome://blah" (and some chrome: URLs | 776 // web sites to see a referrer of "chrome://blah" (and some chrome: URLs |
| 783 // might have search terms or other stuff we don't want to send to the | 777 // might have search terms or other stuff we don't want to send to the |
| 784 // site), so we send no referrer. | 778 // site), so we send no referrer. |
| 785 params.referrer = Referrer(); | 779 params.referrer = Referrer(); |
| 786 | 780 |
| 787 // Navigations in Web UI pages count as browser-initiated navigations. | 781 // Navigations in Web UI pages count as browser-initiated navigations. |
| 788 params.is_renderer_initiated = false; | 782 params.is_renderer_initiated = false; |
| 789 } | 783 } |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1280 if (navigation_handle) | 1274 if (navigation_handle) |
| 1281 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); | 1275 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); |
| 1282 | 1276 |
| 1283 controller_->SetPendingEntry(std::move(entry)); | 1277 controller_->SetPendingEntry(std::move(entry)); |
| 1284 if (delegate_) | 1278 if (delegate_) |
| 1285 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); | 1279 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); |
| 1286 } | 1280 } |
| 1287 } | 1281 } |
| 1288 | 1282 |
| 1289 } // namespace content | 1283 } // namespace content |
| OLD | NEW |