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 /* | 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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 656 // If Telemetry is running, allow the URL load to proceed as if it's | 656 // If Telemetry is running, allow the URL load to proceed as if it's |
| 657 // unhandled, otherwise Telemetry can't tell if Navigation completed. | 657 // unhandled, otherwise Telemetry can't tell if Navigation completed. |
| 658 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 658 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 659 cc::switches::kEnableGpuBenchmarking)) | 659 cc::switches::kEnableGpuBenchmarking)) |
| 660 return; | 660 return; |
| 661 } | 661 } |
| 662 | 662 |
| 663 // Checks based on params.load_type. | 663 // Checks based on params.load_type. |
| 664 switch (params.load_type) { | 664 switch (params.load_type) { |
| 665 case LOAD_TYPE_DEFAULT: | 665 case LOAD_TYPE_DEFAULT: |
| 666 break; | |
| 667 case LOAD_TYPE_HTTP_POST: | 666 case LOAD_TYPE_HTTP_POST: |
| 668 // TODO(lukasza): This assertion is false - it is also possible to POST to | |
| 669 // an chrome-extension://... URI. This might be more common when | |
| 670 // allowing renderer-initiated POST after fixing https://crbug.com/344348. | |
| 671 if (!params.url.SchemeIs(url::kHttpScheme) && | |
| 672 !params.url.SchemeIs(url::kHttpsScheme)) { | |
| 673 NOTREACHED() << "Http post load must use http(s) scheme."; | |
| 674 return; | |
| 675 } | |
|
Łukasz Anforowicz
2016/07/20 22:23:04
I think simply removing the DCHECK is the best opt
Charlie Reis
2016/07/20 22:50:38
Thanks. I think I agree, if the net stack is just
Charlie Reis
2016/07/21 23:25:21
Sure.
| |
| 676 break; | 667 break; |
| 677 case LOAD_TYPE_DATA: | 668 case LOAD_TYPE_DATA: |
| 678 if (!params.url.SchemeIs(url::kDataScheme)) { | 669 if (!params.url.SchemeIs(url::kDataScheme)) { |
| 679 NOTREACHED() << "Data load must use data scheme."; | 670 NOTREACHED() << "Data load must use data scheme."; |
| 680 return; | 671 return; |
| 681 } | 672 } |
| 682 break; | 673 break; |
| 683 default: | 674 default: |
| 684 NOTREACHED(); | 675 NOTREACHED(); |
| 685 break; | 676 break; |
| (...skipping 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2078 } | 2069 } |
| 2079 } | 2070 } |
| 2080 } | 2071 } |
| 2081 | 2072 |
| 2082 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 2073 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
| 2083 const base::Callback<base::Time()>& get_timestamp_callback) { | 2074 const base::Callback<base::Time()>& get_timestamp_callback) { |
| 2084 get_timestamp_callback_ = get_timestamp_callback; | 2075 get_timestamp_callback_ = get_timestamp_callback; |
| 2085 } | 2076 } |
| 2086 | 2077 |
| 2087 } // namespace content | 2078 } // namespace content |
| OLD | NEW |