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); |