| 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 DCHECK_EQ(resource, main_resource_); | 456 DCHECK_EQ(resource, main_resource_); |
| 457 DCHECK(!redirect_response.IsNull()); | 457 DCHECK(!redirect_response.IsNull()); |
| 458 request_ = request; | 458 request_ = request; |
| 459 | 459 |
| 460 // If the redirecting url is not allowed to display content from the target | 460 // If the redirecting url is not allowed to display content from the target |
| 461 // origin, then block the redirect. | 461 // origin, then block the redirect. |
| 462 const KURL& request_url = request_.Url(); | 462 const KURL& request_url = request_.Url(); |
| 463 RefPtr<SecurityOrigin> redirecting_origin = | 463 RefPtr<SecurityOrigin> redirecting_origin = |
| 464 SecurityOrigin::Create(redirect_response.Url()); | 464 SecurityOrigin::Create(redirect_response.Url()); |
| 465 if (!redirecting_origin->CanDisplay(request_url)) { | 465 if (!redirecting_origin->CanDisplay(request_url)) { |
| 466 FrameLoader::ReportLocalLoadFailed(frame_, request_url.GetString()); | 466 frame_->GetDocument()->ReportLocalLoadFailed(request_url.GetString()); |
| 467 fetcher_->StopFetching(); | 467 fetcher_->StopFetching(); |
| 468 return false; | 468 return false; |
| 469 } | 469 } |
| 470 if (GetFrameLoader().ShouldContinueForRedirectNavigationPolicy( | 470 if (GetFrameLoader().ShouldContinueForRedirectNavigationPolicy( |
| 471 request_, SubstituteData(), this, kCheckContentSecurityPolicy, | 471 request_, SubstituteData(), this, kCheckContentSecurityPolicy, |
| 472 navigation_type_, kNavigationPolicyCurrentTab, load_type_, | 472 navigation_type_, kNavigationPolicyCurrentTab, load_type_, |
| 473 IsClientRedirect(), nullptr) != kNavigationPolicyCurrentTab) { | 473 IsClientRedirect(), nullptr) != kNavigationPolicyCurrentTab) { |
| 474 fetcher_->StopFetching(); | 474 fetcher_->StopFetching(); |
| 475 return false; | 475 return false; |
| 476 } | 476 } |
| (...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1086 InstallNewDocumentReason::kJavascriptURL, | 1086 InstallNewDocumentReason::kJavascriptURL, |
| 1087 kForceSynchronousParsing, KURL()); | 1087 kForceSynchronousParsing, KURL()); |
| 1088 if (!source.IsNull()) | 1088 if (!source.IsNull()) |
| 1089 writer_->AppendReplacingData(source); | 1089 writer_->AppendReplacingData(source); |
| 1090 EndWriting(); | 1090 EndWriting(); |
| 1091 } | 1091 } |
| 1092 | 1092 |
| 1093 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 1093 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 1094 | 1094 |
| 1095 } // namespace blink | 1095 } // namespace blink |
| OLD | NEW |