Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Side by Side Diff: third_party/WebKit/Source/core/loader/DocumentLoader.cpp

Issue 2842253002: Move ReportLocalLoadFailed to ExecutionContext (Closed)
Patch Set: +comment Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 DCHECK(frame_); 459 DCHECK(frame_);
460 DCHECK_EQ(resource, main_resource_); 460 DCHECK_EQ(resource, main_resource_);
461 DCHECK(!redirect_response.IsNull()); 461 DCHECK(!redirect_response.IsNull());
462 request_ = request; 462 request_ = request;
463 463
464 // If the redirecting url is not allowed to display content from the target 464 // If the redirecting url is not allowed to display content from the target
465 // origin, then block the redirect. 465 // origin, then block the redirect.
466 const KURL& request_url = request_.Url(); 466 const KURL& request_url = request_.Url();
467 RefPtr<SecurityOrigin> redirecting_origin = 467 RefPtr<SecurityOrigin> redirecting_origin =
468 SecurityOrigin::Create(redirect_response.Url()); 468 SecurityOrigin::Create(redirect_response.Url());
469 if (!redirecting_origin->CanDisplay(request_url)) {
470 FrameLoader::ReportLocalLoadFailed(frame_, request_url.GetString());
471 fetcher_->StopFetching();
472 return false;
473 }
474 if (GetFrameLoader().ShouldContinueForRedirectNavigationPolicy( 469 if (GetFrameLoader().ShouldContinueForRedirectNavigationPolicy(
475 request_, SubstituteData(), this, kCheckContentSecurityPolicy, 470 request_, SubstituteData(), this, kCheckContentSecurityPolicy,
476 navigation_type_, kNavigationPolicyCurrentTab, load_type_, 471 navigation_type_, kNavigationPolicyCurrentTab, load_type_,
477 IsClientRedirect(), nullptr) != kNavigationPolicyCurrentTab) { 472 IsClientRedirect(), nullptr) != kNavigationPolicyCurrentTab) {
478 fetcher_->StopFetching(); 473 fetcher_->StopFetching();
479 return false; 474 return false;
480 } 475 }
481 476
482 DCHECK(GetTiming().FetchStart()); 477 DCHECK(GetTiming().FetchStart());
483 AppendRedirect(request_url); 478 AppendRedirect(request_url);
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 InstallNewDocumentReason::kJavascriptURL, 1098 InstallNewDocumentReason::kJavascriptURL,
1104 kForceSynchronousParsing, KURL()); 1099 kForceSynchronousParsing, KURL());
1105 if (!source.IsNull()) 1100 if (!source.IsNull())
1106 writer_->AppendReplacingData(source); 1101 writer_->AppendReplacingData(source);
1107 EndWriting(); 1102 EndWriting();
1108 } 1103 }
1109 1104
1110 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); 1105 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader);
1111 1106
1112 } // namespace blink 1107 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698