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

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

Issue 6711047: Fix up some types in the API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mo' fixes 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_request_info_impl.h" 5 #include "webkit/plugins/ppapi/ppb_url_request_info_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "googleurl/src/gurl.h" 9 #include "googleurl/src/gurl.h"
10 #include "net/http/http_util.h" 10 #include "net/http/http_util.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 string->value())); 120 string->value()));
121 break; 121 break;
122 } 122 }
123 default: 123 default:
124 break; 124 break;
125 } 125 }
126 return result; 126 return result;
127 } 127 }
128 128
129 PP_Bool AppendDataToBody(PP_Resource request_id, 129 PP_Bool AppendDataToBody(PP_Resource request_id,
130 const char* data, 130 const void* data,
131 uint32_t len) { 131 uint32_t len) {
132 scoped_refptr<PPB_URLRequestInfo_Impl> request( 132 scoped_refptr<PPB_URLRequestInfo_Impl> request(
133 Resource::GetAs<PPB_URLRequestInfo_Impl>(request_id)); 133 Resource::GetAs<PPB_URLRequestInfo_Impl>(request_id));
134 if (!request) 134 if (!request)
135 return PP_FALSE; 135 return PP_FALSE;
136 136
137 return BoolToPPBool(request->AppendDataToBody(std::string(data, len))); 137 return BoolToPPBool(request->AppendDataToBody(std::string(
138 reinterpret_cast<const char*>(data), len)));
piman 2011/03/24 03:41:36 static_cast
neb 2011/03/25 21:27:10 Done.
138 } 139 }
139 140
140 PP_Bool AppendFileToBody(PP_Resource request_id, 141 PP_Bool AppendFileToBody(PP_Resource request_id,
141 PP_Resource file_ref_id, 142 PP_Resource file_ref_id,
142 int64_t start_offset, 143 int64_t start_offset,
143 int64_t number_of_bytes, 144 int64_t number_of_bytes,
144 PP_Time expected_last_modified_time) { 145 PP_Time expected_last_modified_time) {
145 scoped_refptr<PPB_URLRequestInfo_Impl> request( 146 scoped_refptr<PPB_URLRequestInfo_Impl> request(
146 Resource::GetAs<PPB_URLRequestInfo_Impl>(request_id)); 147 Resource::GetAs<PPB_URLRequestInfo_Impl>(request_id));
147 if (!request) 148 if (!request)
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 344
344 return web_request; 345 return web_request;
345 } 346 }
346 347
347 bool PPB_URLRequestInfo_Impl::RequiresUniversalAccess() const { 348 bool PPB_URLRequestInfo_Impl::RequiresUniversalAccess() const {
348 return has_custom_referrer_url_; 349 return has_custom_referrer_url_;
349 } 350 }
350 351
351 } // namespace ppapi 352 } // namespace ppapi
352 } // namespace webkit 353 } // namespace webkit
OLDNEW
« webkit/plugins/ppapi/ppb_url_loader_impl.cc ('K') | « webkit/plugins/ppapi/ppb_url_loader_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698