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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 | 394 |
395 // Pretend that this was an empty HTTP 200 response. Don't reuse the original | 395 // Pretend that this was an empty HTTP 200 response. Don't reuse the original |
396 // URL for the empty page (https://crbug.com/622385). | 396 // URL for the empty page (https://crbug.com/622385). |
397 // | 397 // |
398 // TODO(mkwst): Remove this once XFO moves to the browser. | 398 // TODO(mkwst): Remove this once XFO moves to the browser. |
399 // https://crbug.com/555418. | 399 // https://crbug.com/555418. |
400 clearMainResourceHandle(); | 400 clearMainResourceHandle(); |
401 KURL blockedURL = SecurityOrigin::urlWithUniqueSecurityOrigin(); | 401 KURL blockedURL = SecurityOrigin::urlWithUniqueSecurityOrigin(); |
402 m_originalRequest.setURL(blockedURL); | 402 m_originalRequest.setURL(blockedURL); |
403 m_request.setURL(blockedURL); | 403 m_request.setURL(blockedURL); |
404 m_redirectChain.removeLast(); | 404 m_redirectChain.pop_back(); |
405 appendRedirect(blockedURL); | 405 appendRedirect(blockedURL); |
406 m_response = ResourceResponse(blockedURL, "text/html", 0, nullAtom, String()); | 406 m_response = ResourceResponse(blockedURL, "text/html", 0, nullAtom, String()); |
407 finishedLoading(monotonicallyIncreasingTime()); | 407 finishedLoading(monotonicallyIncreasingTime()); |
408 | 408 |
409 return; | 409 return; |
410 } | 410 } |
411 | 411 |
412 void DocumentLoader::responseReceived( | 412 void DocumentLoader::responseReceived( |
413 Resource* resource, | 413 Resource* resource, |
414 const ResourceResponse& response, | 414 const ResourceResponse& response, |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 m_writer ? m_writer->encoding() : emptyAtom, true, | 794 m_writer ? m_writer->encoding() : emptyAtom, true, |
795 ForceSynchronousParsing); | 795 ForceSynchronousParsing); |
796 if (!source.isNull()) | 796 if (!source.isNull()) |
797 m_writer->appendReplacingData(source); | 797 m_writer->appendReplacingData(source); |
798 endWriting(); | 798 endWriting(); |
799 } | 799 } |
800 | 800 |
801 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 801 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
802 | 802 |
803 } // namespace blink | 803 } // namespace blink |
OLD | NEW |