| 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 // WebKit sometimes gives up empty data to append. These aren't | 444 // WebKit sometimes gives up empty data to append. These aren't |
| 445 // necessary so we just optimize those out here. | 445 // necessary so we just optimize those out here. |
| 446 bridge_->AppendDataToUpload(e.m_data.data(), | 446 bridge_->AppendDataToUpload(e.m_data.data(), |
| 447 static_cast<int>(e.m_data.size())); | 447 static_cast<int>(e.m_data.size())); |
| 448 } | 448 } |
| 449 } else { | 449 } else { |
| 450 bridge_->AppendFileToUpload( | 450 bridge_->AppendFileToUpload( |
| 451 webkit_glue::StringToStdWString(e.m_filename)); | 451 webkit_glue::StringToStdWString(e.m_filename)); |
| 452 } | 452 } |
| 453 } | 453 } |
| 454 bridge_->SetUploadIdentifier(request_.httpBody()->identifier()); |
| 454 } | 455 } |
| 455 | 456 |
| 456 if (sync_load_response) { | 457 if (sync_load_response) { |
| 457 bridge_->SyncLoad(sync_load_response); | 458 bridge_->SyncLoad(sync_load_response); |
| 458 return true; | 459 return true; |
| 459 } | 460 } |
| 460 | 461 |
| 461 bool rv = bridge_->Start(this); | 462 bool rv = bridge_->Start(this); |
| 462 if (rv) { | 463 if (rv) { |
| 463 pending_ = true; | 464 pending_ = true; |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 // if the request cannot be serviced from cache. We force the 'DontLoad' | 752 // if the request cannot be serviced from cache. We force the 'DontLoad' |
| 752 // cache policy at this point to ensure that we never hit the network for | 753 // cache policy at this point to ensure that we never hit the network for |
| 753 // this request. | 754 // this request. |
| 754 // | 755 // |
| 755 DCHECK(request.httpMethod() == "POST"); | 756 DCHECK(request.httpMethod() == "POST"); |
| 756 request.setCachePolicy(ReturnCacheDataDontLoad); | 757 request.setCachePolicy(ReturnCacheDataDontLoad); |
| 757 return true; | 758 return true; |
| 758 } | 759 } |
| 759 | 760 |
| 760 } // namespace WebCore | 761 } // namespace WebCore |
| OLD | NEW |