| 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 "googleurl/src/gurl.h" | 8 #include "googleurl/src/gurl.h" |
| 9 #include "third_party/ppapi/c/pp_var.h" | 9 #include "third_party/ppapi/c/pp_var.h" |
| 10 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" | 10 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 bool value) { | 111 bool value) { |
| 112 NOTIMPLEMENTED(); // TODO(darin): Implement me! | 112 NOTIMPLEMENTED(); // TODO(darin): Implement me! |
| 113 return false; | 113 return false; |
| 114 } | 114 } |
| 115 | 115 |
| 116 bool URLRequestInfo::SetStringProperty(PP_URLRequestProperty property, | 116 bool URLRequestInfo::SetStringProperty(PP_URLRequestProperty property, |
| 117 const std::string& value) { | 117 const std::string& value) { |
| 118 // TODO(darin): Validate input. Perhaps at a different layer? | 118 // TODO(darin): Validate input. Perhaps at a different layer? |
| 119 switch (property) { | 119 switch (property) { |
| 120 case PP_URLRequestProperty_URL: | 120 case PP_URLRequestProperty_URL: |
| 121 web_request_.setURL(GURL(value)); | 121 // Keep the url in a string instead of a URL object because it might not |
| 122 // be complete yet. |
| 123 url_ = value; |
| 122 return true; | 124 return true; |
| 123 case PP_URLRequestProperty_Method: | 125 case PP_URLRequestProperty_Method: |
| 124 web_request_.setHTTPMethod(WebString::fromUTF8(value)); | 126 web_request_.setHTTPMethod(WebString::fromUTF8(value)); |
| 125 return true; | 127 return true; |
| 126 case PP_URLRequestProperty_Headers: | 128 case PP_URLRequestProperty_Headers: |
| 127 // TODO(darin): Support extra request headers | 129 // TODO(darin): Support extra request headers |
| 128 NOTIMPLEMENTED(); | 130 NOTIMPLEMENTED(); |
| 129 return false; | 131 return false; |
| 130 default: | 132 default: |
| 131 return false; | 133 return false; |
| 132 } | 134 } |
| 133 } | 135 } |
| 134 | 136 |
| 135 bool URLRequestInfo::AppendDataToBody(const std::string& data) { | 137 bool URLRequestInfo::AppendDataToBody(const std::string& data) { |
| 136 NOTIMPLEMENTED(); // TODO(darin): Implement me! | 138 NOTIMPLEMENTED(); // TODO(darin): Implement me! |
| 137 return false; | 139 return false; |
| 138 } | 140 } |
| 139 | 141 |
| 140 bool URLRequestInfo::AppendFileToBody(FileRef* file_ref, | 142 bool URLRequestInfo::AppendFileToBody(FileRef* file_ref, |
| 141 int64_t start_offset, | 143 int64_t start_offset, |
| 142 int64_t number_of_bytes, | 144 int64_t number_of_bytes, |
| 143 PP_Time expected_last_modified_time) { | 145 PP_Time expected_last_modified_time) { |
| 144 NOTIMPLEMENTED(); // TODO(darin): Implement me! | 146 NOTIMPLEMENTED(); // TODO(darin): Implement me! |
| 145 return false; | 147 return false; |
| 146 } | 148 } |
| 147 | 149 |
| 148 } // namespace pepper | 150 } // namespace pepper |
| OLD | NEW |