| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // This file replaces WebCore/platform/network/win/ResourceHandleWin.cpp with a | 5 // This file replaces WebCore/platform/network/win/ResourceHandleWin.cpp with a |
| 6 // platform-neutral implementation that simply defers almost entirely to | 6 // platform-neutral implementation that simply defers almost entirely to |
| 7 // ResouceLoaderBridge. | 7 // ResouceLoaderBridge. |
| 8 // | 8 // |
| 9 // This uses the same ResourceHandle.h header file that the rest of WebKit | 9 // This uses the same ResourceHandle.h header file that the rest of WebKit |
| 10 // uses, allowing us to avoid complicated changes. Our specific things are | 10 // uses, allowing us to avoid complicated changes. Our specific things are |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 const FormDataElement& e = elements[static_cast<unsigned>(i)]; | 444 const FormDataElement& e = elements[static_cast<unsigned>(i)]; |
| 445 if (e.m_type == FormDataElement::data) { | 445 if (e.m_type == FormDataElement::data) { |
| 446 if (e.m_data.size() > 0) { | 446 if (e.m_data.size() > 0) { |
| 447 // WebKit sometimes gives up empty data to append. These aren't | 447 // WebKit sometimes gives up empty data to append. These aren't |
| 448 // necessary so we just optimize those out here. | 448 // necessary so we just optimize those out here. |
| 449 bridge_->AppendDataToUpload(e.m_data.data(), | 449 bridge_->AppendDataToUpload(e.m_data.data(), |
| 450 static_cast<int>(e.m_data.size())); | 450 static_cast<int>(e.m_data.size())); |
| 451 } | 451 } |
| 452 } else { | 452 } else { |
| 453 bridge_->AppendFileToUpload( | 453 bridge_->AppendFileToUpload( |
| 454 webkit_glue::StringToStdWString(e.m_filename)); | 454 FilePath(webkit_glue::StringToFilePathString(e.m_filename))); |
| 455 } | 455 } |
| 456 } | 456 } |
| 457 bridge_->SetUploadIdentifier(request_.httpBody()->identifier()); | 457 bridge_->SetUploadIdentifier(request_.httpBody()->identifier()); |
| 458 } | 458 } |
| 459 | 459 |
| 460 if (sync_load_response) { | 460 if (sync_load_response) { |
| 461 bridge_->SyncLoad(sync_load_response); | 461 bridge_->SyncLoad(sync_load_response); |
| 462 return true; | 462 return true; |
| 463 } | 463 } |
| 464 | 464 |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 // if the request cannot be serviced from cache. We force the 'DontLoad' | 755 // if the request cannot be serviced from cache. We force the 'DontLoad' |
| 756 // cache policy at this point to ensure that we never hit the network for | 756 // cache policy at this point to ensure that we never hit the network for |
| 757 // this request. | 757 // this request. |
| 758 // | 758 // |
| 759 DCHECK(request.httpMethod() == "POST"); | 759 DCHECK(request.httpMethod() == "POST"); |
| 760 request.setCachePolicy(ReturnCacheDataDontLoad); | 760 request.setCachePolicy(ReturnCacheDataDontLoad); |
| 761 return true; | 761 return true; |
| 762 } | 762 } |
| 763 | 763 |
| 764 } // namespace WebCore | 764 } // namespace WebCore |
| OLD | NEW |