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

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
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..627b31f5f576a051dff962fce83dad88961724cb 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;
Lei Zhang 2016/11/08 01:28:10 Side note: I wonder if this is actually needed to
raymes 2016/11/08 06:00:01 Done.
Lei Zhang 2016/11/08 07:19:31 Wasn't expecting this change, but if it works, the
DocumentLoadFailed();
}
}
@@ -1450,6 +1445,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);

Powered by Google App Engine
This is Rietveld 408576698