| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 6 * (http://www.torchmobile.com/) | 6 * (http://www.torchmobile.com/) |
| 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
| 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
| 10 * Copyright (C) 2011 Google Inc. All rights reserved. | 10 * Copyright (C) 2011 Google Inc. All rights reserved. |
| (...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1300 should_check_main_world_content_security_policy, | 1300 should_check_main_world_content_security_policy, |
| 1301 NavigationType type, | 1301 NavigationType type, |
| 1302 NavigationPolicy policy, | 1302 NavigationPolicy policy, |
| 1303 FrameLoadType frame_load_type, | 1303 FrameLoadType frame_load_type, |
| 1304 bool is_client_redirect, | 1304 bool is_client_redirect, |
| 1305 HTMLFormElement* form) { | 1305 HTMLFormElement* form) { |
| 1306 // Don't ask if we are loading an empty URL. | 1306 // Don't ask if we are loading an empty URL. |
| 1307 if (request.Url().IsEmpty() || substitute_data.IsValid()) | 1307 if (request.Url().IsEmpty() || substitute_data.IsValid()) |
| 1308 return kNavigationPolicyCurrentTab; | 1308 return kNavigationPolicyCurrentTab; |
| 1309 | 1309 |
| 1310 // Check for non-escaped new lines in the url. |
| 1311 if (request.Url().WhitespaceRemoved()) { |
| 1312 Deprecation::CountDeprecation( |
| 1313 frame_, UseCounter::kCanRequestURLHTTPContainingNewline); |
| 1314 if (request.Url().ProtocolIsInHTTPFamily()) { |
| 1315 if (RuntimeEnabledFeatures::restrictCanRequestURLCharacterSetEnabled()) |
| 1316 return kNavigationPolicyIgnore; |
| 1317 } else { |
| 1318 UseCounter::Count(frame_, |
| 1319 UseCounter::kCanRequestURLNonHTTPContainingNewline); |
| 1320 } |
| 1321 } |
| 1322 |
| 1310 Settings* settings = frame_->GetSettings(); | 1323 Settings* settings = frame_->GetSettings(); |
| 1311 if (MaybeCheckCSP(request, type, frame_, policy, | 1324 if (MaybeCheckCSP(request, type, frame_, policy, |
| 1312 should_check_main_world_content_security_policy == | 1325 should_check_main_world_content_security_policy == |
| 1313 kCheckContentSecurityPolicy, | 1326 kCheckContentSecurityPolicy, |
| 1314 settings && settings->GetBrowserSideNavigationEnabled(), | 1327 settings && settings->GetBrowserSideNavigationEnabled(), |
| 1315 ContentSecurityPolicy::CheckHeaderType::kCheckEnforce) == | 1328 ContentSecurityPolicy::CheckHeaderType::kCheckEnforce) == |
| 1316 kNavigationPolicyIgnore) { | 1329 kNavigationPolicyIgnore) { |
| 1317 return kNavigationPolicyIgnore; | 1330 return kNavigationPolicyIgnore; |
| 1318 } | 1331 } |
| 1319 | 1332 |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1710 // TODO(japhet): This is needed because the browser process DCHECKs if the | 1723 // TODO(japhet): This is needed because the browser process DCHECKs if the |
| 1711 // first entry we commit in a new frame has replacement set. It's unclear | 1724 // first entry we commit in a new frame has replacement set. It's unclear |
| 1712 // whether the DCHECK is right, investigate removing this special case. | 1725 // whether the DCHECK is right, investigate removing this special case. |
| 1713 bool replace_current_item = load_type == kFrameLoadTypeReplaceCurrentItem && | 1726 bool replace_current_item = load_type == kFrameLoadTypeReplaceCurrentItem && |
| 1714 (!Opener() || !request.Url().IsEmpty()); | 1727 (!Opener() || !request.Url().IsEmpty()); |
| 1715 loader->SetReplacesCurrentHistoryItem(replace_current_item); | 1728 loader->SetReplacesCurrentHistoryItem(replace_current_item); |
| 1716 return loader; | 1729 return loader; |
| 1717 } | 1730 } |
| 1718 | 1731 |
| 1719 } // namespace blink | 1732 } // namespace blink |
| OLD | NEW |