Index: pdf/out_of_process_instance.cc |
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc |
index 981bfaf8d3753dd6b02736488506597bfaa72873..d4eac91d97bd5afe00077c71bcd0ff6db98a4575 100644 |
--- a/pdf/out_of_process_instance.cc |
+++ b/pdf/out_of_process_instance.cc |
@@ -846,13 +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_)) { |
+ document_load_state_ = LOAD_STATE_LOADING; |
DocumentLoadFailed(); |
} |
@@ -1459,6 +1454,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); |