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

Side by Side Diff: webkit/plugins/ppapi/ppb_url_loader_impl.cc

Issue 6652014: Pepper: Add a property to URLRequestInfo to skip header validation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: used undefined var to unset Created 9 years, 9 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "webkit/plugins/ppapi/ppb_url_loader_impl.h" 5 #include "webkit/plugins/ppapi/ppb_url_loader_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ppapi/c/pp_completion_callback.h" 8 #include "ppapi/c/pp_completion_callback.h"
9 #include "ppapi/c/pp_errors.h" 9 #include "ppapi/c/pp_errors.h"
10 #include "ppapi/c/ppb_url_loader.h" 10 #include "ppapi/c/ppb_url_loader.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 loader_.reset(); 235 loader_.reset();
236 } 236 }
237 } 237 }
238 238
239 int32_t PPB_URLLoader_Impl::Open(PPB_URLRequestInfo_Impl* request, 239 int32_t PPB_URLLoader_Impl::Open(PPB_URLRequestInfo_Impl* request,
240 PP_CompletionCallback callback) { 240 PP_CompletionCallback callback) {
241 int32_t rv = ValidateCallback(callback); 241 int32_t rv = ValidateCallback(callback);
242 if (rv != PP_OK) 242 if (rv != PP_OK)
243 return rv; 243 return rv;
244 244
245 if (request->RequiresUniversalAccess() &&
246 !has_universal_access_)
brettw 2011/03/11 23:31:05 This should fit on one line.
viettrungluu 2011/03/14 17:13:53 Done.
247 return PP_ERROR_BADARGUMENT;
248
245 if (loader_.get()) 249 if (loader_.get())
246 return PP_ERROR_INPROGRESS; 250 return PP_ERROR_INPROGRESS;
247 251
248 WebFrame* frame = GetFrame(instance()); 252 WebFrame* frame = GetFrame(instance());
249 if (!frame) 253 if (!frame)
250 return PP_ERROR_FAILED; 254 return PP_ERROR_FAILED;
251 WebURLRequest web_request(request->ToWebURLRequest(frame)); 255 WebURLRequest web_request(request->ToWebURLRequest(frame));
252 256
253 rv = CanRequest(frame, web_request.url()); 257 rv = CanRequest(frame, web_request.url());
254 if (rv != PP_OK) 258 if (rv != PP_OK)
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 bool PPB_URLLoader_Impl::RecordDownloadProgress() const { 540 bool PPB_URLLoader_Impl::RecordDownloadProgress() const {
537 return request_info_ && request_info_->record_download_progress(); 541 return request_info_ && request_info_->record_download_progress();
538 } 542 }
539 543
540 bool PPB_URLLoader_Impl::RecordUploadProgress() const { 544 bool PPB_URLLoader_Impl::RecordUploadProgress() const {
541 return request_info_ && request_info_->record_upload_progress(); 545 return request_info_ && request_info_->record_upload_progress();
542 } 546 }
543 547
544 } // namespace ppapi 548 } // namespace ppapi
545 } // namespace webkit 549 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698