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

Unified Diff: pdf/out_of_process_instance.cc

Issue 2455663004: Add test to ensure that URLs that redirect inside the PDF plugin fail to load (Closed)
Patch Set: . Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pdf/document_loader.cc ('k') | pdf/pdfium/pdfium_engine.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/out_of_process_instance.cc
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc
index eb1c17a022a4d67a78c2a5c83f29e1c109e630a3..7063907677af42a5967a64b42ca863ff26faf615 100644
--- a/pdf/out_of_process_instance.cc
+++ b/pdf/out_of_process_instance.cc
@@ -846,15 +846,8 @@ void OutOfProcessInstance::OnPaint(
}
void OutOfProcessInstance::DidOpen(int32_t result) {
- if (result == PP_OK) {
- if (!engine_->HandleDocumentLoad(embed_loader_)) {
- document_load_state_ = LOAD_STATE_LOADING;
- DocumentLoadFailed();
- }
- } else if (result != PP_ERROR_ABORTED) { // Can happen in tests.
- NOTREACHED();
+ if (result != PP_OK || !engine_->HandleDocumentLoad(embed_loader_))
DocumentLoadFailed();
- }
}
void OutOfProcessInstance::DidOpenPreview(int32_t result) {
@@ -1450,6 +1443,7 @@ void OutOfProcessInstance::LoadUrlInternal(
pp::URLRequestInfo request(this);
request.SetURL(url);
request.SetMethod("GET");
+ request.SetFollowRedirects(false);
*loader = CreateURLLoaderInternal();
pp::CompletionCallback callback = loader_factory_.NewCallback(method);
« no previous file with comments | « pdf/document_loader.cc ('k') | pdf/pdfium/pdfium_engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698