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/navigation_controller_impl.h" | 5 #include "content/browser/frame_host/navigation_controller_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/string_number_conversions.h" // Temporary | 10 #include "base/strings/string_number_conversions.h" // Temporary |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 params.transition_type = transition; | 635 params.transition_type = transition; |
636 params.extra_headers = extra_headers; | 636 params.extra_headers = extra_headers; |
637 LoadURLWithParams(params); | 637 LoadURLWithParams(params); |
638 } | 638 } |
639 | 639 |
640 void NavigationControllerImpl::LoadURLWithParams(const LoadURLParams& params) { | 640 void NavigationControllerImpl::LoadURLWithParams(const LoadURLParams& params) { |
641 TRACE_EVENT0("browser", "NavigationControllerImpl::LoadURLWithParams"); | 641 TRACE_EVENT0("browser", "NavigationControllerImpl::LoadURLWithParams"); |
642 if (HandleDebugURL(params.url, params.transition_type)) | 642 if (HandleDebugURL(params.url, params.transition_type)) |
643 return; | 643 return; |
644 | 644 |
| 645 // Any renderer-side debug URLs or javascript: URLs should be ignored if the |
| 646 // renderer process is not live. |
| 647 if (IsRendererDebugURL(params.url)) { |
| 648 // TODO(creis): Find the RVH for the correct frame. |
| 649 if (!delegate_->GetRenderViewHost()->IsRenderViewLive()) |
| 650 return; |
| 651 } |
| 652 |
645 // Checks based on params.load_type. | 653 // Checks based on params.load_type. |
646 switch (params.load_type) { | 654 switch (params.load_type) { |
647 case LOAD_TYPE_DEFAULT: | 655 case LOAD_TYPE_DEFAULT: |
648 break; | 656 break; |
649 case LOAD_TYPE_BROWSER_INITIATED_HTTP_POST: | 657 case LOAD_TYPE_BROWSER_INITIATED_HTTP_POST: |
650 if (!params.url.SchemeIs(kHttpScheme) && | 658 if (!params.url.SchemeIs(kHttpScheme) && |
651 !params.url.SchemeIs(kHttpsScheme)) { | 659 !params.url.SchemeIs(kHttpsScheme)) { |
652 NOTREACHED() << "Http post load must use http(s) scheme."; | 660 NOTREACHED() << "Http post load must use http(s) scheme."; |
653 return; | 661 return; |
654 } | 662 } |
(...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1714 } | 1722 } |
1715 } | 1723 } |
1716 } | 1724 } |
1717 | 1725 |
1718 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 1726 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
1719 const base::Callback<base::Time()>& get_timestamp_callback) { | 1727 const base::Callback<base::Time()>& get_timestamp_callback) { |
1720 get_timestamp_callback_ = get_timestamp_callback; | 1728 get_timestamp_callback_ = get_timestamp_callback; |
1721 } | 1729 } |
1722 | 1730 |
1723 } // namespace content | 1731 } // namespace content |
OLD | NEW |