Chromium Code Reviews| 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 357 } | 357 } |
| 358 | 358 |
| 359 void DocumentLoader::cancelLoadAfterXFrameOptionsOrCSPDenied(const ResourceRespo nse& response) | 359 void DocumentLoader::cancelLoadAfterXFrameOptionsOrCSPDenied(const ResourceRespo nse& response) |
| 360 { | 360 { |
| 361 InspectorInstrumentation::continueAfterXFrameOptionsDenied(m_frame, this, ma inResourceIdentifier(), response, m_mainResource.get()); | 361 InspectorInstrumentation::continueAfterXFrameOptionsDenied(m_frame, this, ma inResourceIdentifier(), response, m_mainResource.get()); |
| 362 | 362 |
| 363 setWasBlockedAfterXFrameOptionsOrCSP(); | 363 setWasBlockedAfterXFrameOptionsOrCSP(); |
| 364 | 364 |
| 365 // Pretend that this was an empty HTTP 200 response. | 365 // Pretend that this was an empty HTTP 200 response. |
| 366 clearMainResourceHandle(); | 366 clearMainResourceHandle(); |
| 367 m_response = ResourceResponse(blankURL(), "text/html", 0, nullAtom, String() ); | 367 updateForSameDocumentNavigation(SecurityOrigin::urlWithUniqueSecurityOrigin( ), SameDocumentNavigationDefault); |
|
Charlie Reis
2016/06/23 05:56:45
Why same document? Aren't we leaving the current
Mike West
2016/06/23 06:26:40
We haven't created the document yet for this respo
alexmos
2016/06/23 14:09:45
I think I do need the redirect bits. I tried this
Mike West
2016/06/23 15:35:10
Hrm. Ok. I think I'd prefer for you to just extrac
alexmos
2016/06/23 17:37:33
Done. Removed the function call in favor of expli
| |
| 368 m_response = ResourceResponse(SecurityOrigin::urlWithUniqueSecurityOrigin(), "text/html", 0, nullAtom, String()); | |
| 368 finishedLoading(monotonicallyIncreasingTime()); | 369 finishedLoading(monotonicallyIncreasingTime()); |
| 369 | 370 |
| 370 return; | 371 return; |
| 371 } | 372 } |
| 372 | 373 |
| 373 void DocumentLoader::responseReceived(Resource* resource, const ResourceResponse & response, PassOwnPtr<WebDataConsumerHandle> handle) | 374 void DocumentLoader::responseReceived(Resource* resource, const ResourceResponse & response, PassOwnPtr<WebDataConsumerHandle> handle) |
| 374 { | 375 { |
| 375 ASSERT_UNUSED(resource, m_mainResource == resource); | 376 ASSERT_UNUSED(resource, m_mainResource == resource); |
| 376 ASSERT_UNUSED(handle, !handle); | 377 ASSERT_UNUSED(handle, !handle); |
| 377 ASSERT(frame()); | 378 ASSERT(frame()); |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 702 { | 703 { |
| 703 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing); | 704 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing); |
| 704 if (!source.isNull()) | 705 if (!source.isNull()) |
| 705 m_writer->appendReplacingData(source); | 706 m_writer->appendReplacingData(source); |
| 706 endWriting(m_writer.get()); | 707 endWriting(m_writer.get()); |
| 707 } | 708 } |
| 708 | 709 |
| 709 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 710 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 710 | 711 |
| 711 } // namespace blink | 712 } // namespace blink |
| OLD | NEW |