OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/glue/plugins/pepper_url_request_info.h" | 5 #include "webkit/glue/plugins/pepper_url_request_info.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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 return &ppb_urlrequestinfo; | 157 return &ppb_urlrequestinfo; |
158 } | 158 } |
159 | 159 |
160 bool URLRequestInfo::SetBooleanProperty(PP_URLRequestProperty_Dev property, | 160 bool URLRequestInfo::SetBooleanProperty(PP_URLRequestProperty_Dev property, |
161 bool value) { | 161 bool value) { |
162 switch (property) { | 162 switch (property) { |
163 case PP_URLREQUESTPROPERTY_STREAMTOFILE: | 163 case PP_URLREQUESTPROPERTY_STREAMTOFILE: |
164 stream_to_file_ = value; | 164 stream_to_file_ = value; |
165 return true; | 165 return true; |
166 default: | 166 default: |
167 NOTIMPLEMENTED(); // TODO(darin): Implement me! | 167 //NOTIMPLEMENTED(); // TODO(darin): Implement me! |
168 return false; | 168 return false; |
169 } | 169 } |
170 } | 170 } |
171 | 171 |
172 bool URLRequestInfo::SetStringProperty(PP_URLRequestProperty_Dev property, | 172 bool URLRequestInfo::SetStringProperty(PP_URLRequestProperty_Dev property, |
173 const std::string& value) { | 173 const std::string& value) { |
174 // TODO(darin): Validate input. Perhaps at a different layer? | 174 // TODO(darin): Validate input. Perhaps at a different layer? |
175 switch (property) { | 175 switch (property) { |
176 case PP_URLREQUESTPROPERTY_URL: | 176 case PP_URLREQUESTPROPERTY_URL: |
177 url_ = value; // NOTE: This may be a relative URL. | 177 url_ = value; // NOTE: This may be a relative URL. |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 } | 249 } |
250 } | 250 } |
251 web_request.setHTTPBody(http_body); | 251 web_request.setHTTPBody(http_body); |
252 } | 252 } |
253 | 253 |
254 frame->setReferrerForRequest(web_request, WebURL()); // Use default. | 254 frame->setReferrerForRequest(web_request, WebURL()); // Use default. |
255 return web_request; | 255 return web_request; |
256 } | 256 } |
257 | 257 |
258 } // namespace pepper | 258 } // namespace pepper |
OLD | NEW |