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

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

Issue 15303010: Call dispatchDidReceiveServerRedirectForProvisionalLoad before checking navigation policy for a red… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 cancelMainResourceLoad(frameLoader()->cancelledError(newRequest)); 483 cancelMainResourceLoad(frameLoader()->cancelledError(newRequest));
484 return; 484 return;
485 } 485 }
486 } 486 }
487 487
488 setRequest(newRequest); 488 setRequest(newRequest);
489 489
490 if (redirectResponse.isNull()) 490 if (redirectResponse.isNull())
491 return; 491 return;
492 492
493 frameLoader()->client()->dispatchDidReceiveServerRedirectForProvisionalLoad( );
493 if (!shouldContinueForNavigationPolicy(newRequest)) 494 if (!shouldContinueForNavigationPolicy(newRequest))
494 stopLoadingForPolicyChange(); 495 stopLoadingForPolicyChange();
495 } 496 }
496 497
497 bool DocumentLoader::shouldContinueForResponse() const 498 bool DocumentLoader::shouldContinueForResponse() const
498 { 499 {
499 if (m_substituteData.isValid()) 500 if (m_substituteData.isValid())
500 return true; 501 return true;
501 502
502 int statusCode = m_response.httpStatusCode(); 503 int statusCode = m_response.httpStatusCode();
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 commitLoad(resourceData->data(), resourceData->size()); 1140 commitLoad(resourceData->data(), resourceData->size());
1140 } 1141 }
1141 1142
1142 void DocumentLoader::handledOnloadEvents() 1143 void DocumentLoader::handledOnloadEvents()
1143 { 1144 {
1144 m_wasOnloadHandled = true; 1145 m_wasOnloadHandled = true;
1145 applicationCacheHost()->stopDeferringEvents(); 1146 applicationCacheHost()->stopDeferringEvents();
1146 } 1147 }
1147 1148
1148 } // namespace WebCore 1149 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/loading/redirect-methods-expected.txt ('k') | Source/core/loader/ResourceLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698