| 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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 MessageLoop::current()->PostTask(FROM_HERE, | 405 MessageLoop::current()->PostTask(FROM_HERE, |
| 406 data_url_factory_.NewRunnableMethod( | 406 data_url_factory_.NewRunnableMethod( |
| 407 &ResourceHandleInternal::HandleDataUrl)); | 407 &ResourceHandleInternal::HandleDataUrl)); |
| 408 } | 408 } |
| 409 return true; | 409 return true; |
| 410 } | 410 } |
| 411 | 411 |
| 412 // TODO(abarth): These are wrong! I need to figure out how to get the right | 412 // TODO(abarth): These are wrong! I need to figure out how to get the right |
| 413 // strings here. See: http://crbug.com/8706 | 413 // strings here. See: http://crbug.com/8706 |
| 414 std::string frame_origin = | 414 std::string frame_origin = |
| 415 webkit_glue::StringToStdString(request_.mainDocumentURL().string()); | 415 webkit_glue::StringToStdString(request_.firstPartyForCookies().string()); |
| 416 std::string main_frame_origin = | 416 std::string main_frame_origin = |
| 417 webkit_glue::StringToStdString(request_.mainDocumentURL().string()); | 417 webkit_glue::StringToStdString(request_.firstPartyForCookies().string()); |
| 418 | 418 |
| 419 // TODO(darin): is latin1 really correct here? It is if the strings are | 419 // TODO(darin): is latin1 really correct here? It is if the strings are |
| 420 // already ASCII (i.e., if they are already escaped properly). | 420 // already ASCII (i.e., if they are already escaped properly). |
| 421 // TODO(brettw) this should take parameter encoding into account when | 421 // TODO(brettw) this should take parameter encoding into account when |
| 422 // creating the GURLs. | 422 // creating the GURLs. |
| 423 bridge_.reset(ResourceLoaderBridge::Create( | 423 bridge_.reset(ResourceLoaderBridge::Create( |
| 424 webkit_glue::CStringToStdString(method), | 424 webkit_glue::CStringToStdString(method), |
| 425 url, | 425 url, |
| 426 webkit_glue::KURLToGURL(request_.policyURL()), | 426 webkit_glue::KURLToGURL(request_.policyURL()), |
| 427 referrer, | 427 referrer, |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 // if the request cannot be serviced from cache. We force the 'DontLoad' | 756 // if the request cannot be serviced from cache. We force the 'DontLoad' |
| 757 // cache policy at this point to ensure that we never hit the network for | 757 // cache policy at this point to ensure that we never hit the network for |
| 758 // this request. | 758 // this request. |
| 759 // | 759 // |
| 760 DCHECK(request.httpMethod() == "POST"); | 760 DCHECK(request.httpMethod() == "POST"); |
| 761 request.setCachePolicy(ReturnCacheDataDontLoad); | 761 request.setCachePolicy(ReturnCacheDataDontLoad); |
| 762 return true; | 762 return true; |
| 763 } | 763 } |
| 764 | 764 |
| 765 } // namespace WebCore | 765 } // namespace WebCore |
| OLD | NEW |