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 /* | 5 /* |
6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * | 10 * |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
662 // unhandled, otherwise Telemetry can't tell if Navigation completed. | 662 // unhandled, otherwise Telemetry can't tell if Navigation completed. |
663 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 663 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
664 cc::switches::kEnableGpuBenchmarking)) | 664 cc::switches::kEnableGpuBenchmarking)) |
665 return; | 665 return; |
666 } | 666 } |
667 | 667 |
668 // Checks based on params.load_type. | 668 // Checks based on params.load_type. |
669 switch (params.load_type) { | 669 switch (params.load_type) { |
670 case LOAD_TYPE_DEFAULT: | 670 case LOAD_TYPE_DEFAULT: |
671 break; | 671 break; |
672 case LOAD_TYPE_BROWSER_INITIATED_HTTP_POST: | 672 case LOAD_TYPE_HTTP_POST: |
673 if (!params.url.SchemeIs(url::kHttpScheme) && | 673 if (!params.url.SchemeIs(url::kHttpScheme) && |
674 !params.url.SchemeIs(url::kHttpsScheme)) { | 674 !params.url.SchemeIs(url::kHttpsScheme)) { |
675 NOTREACHED() << "Http post load must use http(s) scheme."; | 675 NOTREACHED() << "Http post load must use http(s) scheme."; |
Charlie Reis
2016/06/09 22:38:16
You determined recently that this check is invalid
Łukasz Anforowicz
2016/06/10 19:20:50
Thanks for raising this issue. You're right - aft
Charlie Reis
2016/06/10 20:59:27
Acknowledged.
| |
676 return; | 676 return; |
677 } | 677 } |
678 break; | 678 break; |
679 case LOAD_TYPE_DATA: | 679 case LOAD_TYPE_DATA: |
680 if (!params.url.SchemeIs(url::kDataScheme)) { | 680 if (!params.url.SchemeIs(url::kDataScheme)) { |
681 NOTREACHED() << "Data load must use data scheme."; | 681 NOTREACHED() << "Data load must use data scheme."; |
682 return; | 682 return; |
683 } | 683 } |
684 break; | 684 break; |
685 default: | 685 default: |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
761 entry->set_intent_received_timestamp( | 761 entry->set_intent_received_timestamp( |
762 base::TimeTicks() + | 762 base::TimeTicks() + |
763 base::TimeDelta::FromMilliseconds(params.intent_received_timestamp)); | 763 base::TimeDelta::FromMilliseconds(params.intent_received_timestamp)); |
764 } | 764 } |
765 entry->set_has_user_gesture(params.has_user_gesture); | 765 entry->set_has_user_gesture(params.has_user_gesture); |
766 #endif | 766 #endif |
767 | 767 |
768 switch (params.load_type) { | 768 switch (params.load_type) { |
769 case LOAD_TYPE_DEFAULT: | 769 case LOAD_TYPE_DEFAULT: |
770 break; | 770 break; |
771 case LOAD_TYPE_BROWSER_INITIATED_HTTP_POST: | 771 case LOAD_TYPE_HTTP_POST: |
772 entry->SetHasPostData(true); | 772 entry->SetHasPostData(true); |
773 entry->SetBrowserInitiatedPostData( | 773 entry->SetPostData(params.post_data); |
774 params.browser_initiated_post_data.get()); | |
775 break; | 774 break; |
776 case LOAD_TYPE_DATA: | 775 case LOAD_TYPE_DATA: |
777 entry->SetBaseURLForDataURL(params.base_url_for_data_url); | 776 entry->SetBaseURLForDataURL(params.base_url_for_data_url); |
778 entry->SetVirtualURL(params.virtual_url_for_data_url); | 777 entry->SetVirtualURL(params.virtual_url_for_data_url); |
779 #if defined(OS_ANDROID) | 778 #if defined(OS_ANDROID) |
780 entry->SetDataURLAsString(params.data_url_as_string); | 779 entry->SetDataURLAsString(params.data_url_as_string); |
781 #endif | 780 #endif |
782 entry->SetCanLoadLocalResources(params.can_load_local_resources); | 781 entry->SetCanLoadLocalResources(params.can_load_local_resources); |
783 break; | 782 break; |
784 default: | 783 default: |
(...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2060 } | 2059 } |
2061 } | 2060 } |
2062 } | 2061 } |
2063 | 2062 |
2064 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 2063 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
2065 const base::Callback<base::Time()>& get_timestamp_callback) { | 2064 const base::Callback<base::Time()>& get_timestamp_callback) { |
2066 get_timestamp_callback_ = get_timestamp_callback; | 2065 get_timestamp_callback_ = get_timestamp_callback; |
2067 } | 2066 } |
2068 | 2067 |
2069 } // namespace content | 2068 } // namespace content |
OLD | NEW |