| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 // If the redirecting url is not allowed to display content from the target | 485 // If the redirecting url is not allowed to display content from the target |
| 486 // origin, then block the redirect. | 486 // origin, then block the redirect. |
| 487 const KURL& request_url = request_.Url(); | 487 const KURL& request_url = request_.Url(); |
| 488 RefPtr<SecurityOrigin> redirecting_origin = | 488 RefPtr<SecurityOrigin> redirecting_origin = |
| 489 SecurityOrigin::Create(redirect_response.Url()); | 489 SecurityOrigin::Create(redirect_response.Url()); |
| 490 if (!redirecting_origin->CanDisplay(request_url)) { | 490 if (!redirecting_origin->CanDisplay(request_url)) { |
| 491 FrameLoader::ReportLocalLoadFailed(frame_, request_url.GetString()); | 491 FrameLoader::ReportLocalLoadFailed(frame_, request_url.GetString()); |
| 492 fetcher_->StopFetching(); | 492 fetcher_->StopFetching(); |
| 493 return false; | 493 return false; |
| 494 } | 494 } |
| 495 if (GetFrameLoader().ShouldContinueForNavigationPolicy( | 495 if (GetFrameLoader().ShouldContinueForRedirectNavigationPolicy( |
| 496 request_, SubstituteData(), this, kCheckContentSecurityPolicy, | 496 request_, SubstituteData(), this, kCheckContentSecurityPolicy, |
| 497 navigation_type_, kNavigationPolicyCurrentTab, load_type_, | 497 navigation_type_, kNavigationPolicyCurrentTab, load_type_, |
| 498 IsClientRedirect(), nullptr) != kNavigationPolicyCurrentTab) { | 498 IsClientRedirect(), nullptr) != kNavigationPolicyCurrentTab) { |
| 499 fetcher_->StopFetching(); | 499 fetcher_->StopFetching(); |
| 500 return false; | 500 return false; |
| 501 } | 501 } |
| 502 | 502 |
| 503 DCHECK(GetTiming().FetchStart()); | 503 DCHECK(GetTiming().FetchStart()); |
| 504 AppendRedirect(request_url); | 504 AppendRedirect(request_url); |
| 505 GetTiming().AddRedirect(redirect_response.Url(), request_url); | 505 GetTiming().AddRedirect(redirect_response.Url(), request_url); |
| (...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1114 InstallNewDocumentReason::kJavascriptURL, | 1114 InstallNewDocumentReason::kJavascriptURL, |
| 1115 kForceSynchronousParsing, KURL()); | 1115 kForceSynchronousParsing, KURL()); |
| 1116 if (!source.IsNull()) | 1116 if (!source.IsNull()) |
| 1117 writer_->AppendReplacingData(source); | 1117 writer_->AppendReplacingData(source); |
| 1118 EndWriting(); | 1118 EndWriting(); |
| 1119 } | 1119 } |
| 1120 | 1120 |
| 1121 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 1121 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 1122 | 1122 |
| 1123 } // namespace blink | 1123 } // namespace blink |
| OLD | NEW |