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

Side by Side Diff: content/child/npapi/plugin_url_fetcher.cc

Issue 750093005: Fix unititialized read. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/valgrind/drmemory/suppressions.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/child/npapi/plugin_url_fetcher.h" 5 #include "content/child/npapi/plugin_url_fetcher.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "content/child/child_thread.h" 8 #include "content/child/child_thread.h"
9 #include "content/child/multipart_response_delegate.h" 9 #include "content/child/multipart_response_delegate.h"
10 #include "content/child/npapi/plugin_host.h" 10 #include "content/child/npapi/plugin_host.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 request_info.method = method; 109 request_info.method = method;
110 request_info.url = url; 110 request_info.url = url;
111 request_info.first_party_for_cookies = first_party_for_cookies; 111 request_info.first_party_for_cookies = first_party_for_cookies;
112 request_info.referrer = referrer; 112 request_info.referrer = referrer;
113 request_info.load_flags = net::LOAD_NORMAL; 113 request_info.load_flags = net::LOAD_NORMAL;
114 request_info.requestor_pid = origin_pid; 114 request_info.requestor_pid = origin_pid;
115 request_info.request_type = RESOURCE_TYPE_OBJECT; 115 request_info.request_type = RESOURCE_TYPE_OBJECT;
116 request_info.routing_id = render_view_id; 116 request_info.routing_id = render_view_id;
117 // ServiceWorker is disabled for NPAPI. 117 // ServiceWorker is disabled for NPAPI.
118 request_info.skip_service_worker = true; 118 request_info.skip_service_worker = true;
119 request_info.should_reset_appcache = false;
groby-ooo-7-16 2014/12/01 17:51:10 Please do set a default value in the RequestInfo c
eustas 2014/12/02 07:06:02 Surely.
119 120
120 RequestExtraData extra_data; 121 RequestExtraData extra_data;
121 extra_data.set_render_frame_id(render_frame_id); 122 extra_data.set_render_frame_id(render_frame_id);
122 extra_data.set_is_main_frame(false); 123 extra_data.set_is_main_frame(false);
123 request_info.extra_data = &extra_data; 124 request_info.extra_data = &extra_data;
124 125
125 std::vector<char> body; 126 std::vector<char> body;
126 if (method == "POST") { 127 if (method == "POST") {
127 bool content_type_found = false; 128 bool content_type_found = false;
128 std::vector<std::string> names; 129 std::vector<std::string> names;
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 } 369 }
369 370
370 if (error_code == net::OK) { 371 if (error_code == net::OK) {
371 plugin_stream_->DidFinishLoading(resource_id_); 372 plugin_stream_->DidFinishLoading(resource_id_);
372 } else { 373 } else {
373 plugin_stream_->DidFail(resource_id_); 374 plugin_stream_->DidFail(resource_id_);
374 } 375 }
375 } 376 }
376 377
377 } // namespace content 378 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | tools/valgrind/drmemory/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698