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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 } | 395 } |
396 if (!headerBuf.isEmpty()) | 396 if (!headerBuf.isEmpty()) |
397 headerBuf.append(crlf); | 397 headerBuf.append(crlf); |
398 headerBuf.append((*it).first + sep + (*it).second); | 398 headerBuf.append((*it).first + sep + (*it).second); |
399 } | 399 } |
400 | 400 |
401 // TODO(jcampan): in the non out-of-process plugin case the request does not | 401 // TODO(jcampan): in the non out-of-process plugin case the request does not |
402 // have a origin_pid. Find a better place to set this. | 402 // have a origin_pid. Find a better place to set this. |
403 int origin_pid = request_.originPid(); | 403 int origin_pid = request_.originPid(); |
404 if (origin_pid == 0) | 404 if (origin_pid == 0) |
405 origin_pid = process_util::GetCurrentProcId(); | 405 origin_pid = base::GetCurrentProcId(); |
406 | 406 |
407 bool mixed_content = | 407 bool mixed_content = |
408 webkit_glue::KURLToGURL(request_.mainDocumentURL()).SchemeIsSecure() && | 408 webkit_glue::KURLToGURL(request_.mainDocumentURL()).SchemeIsSecure() && |
409 !url.SchemeIsSecure(); | 409 !url.SchemeIsSecure(); |
410 | 410 |
411 if (url.SchemeIs("data")) { | 411 if (url.SchemeIs("data")) { |
412 if (sync_load_response) { | 412 if (sync_load_response) { |
413 // This is a sync load. Do the work now. | 413 // This is a sync load. Do the work now. |
414 sync_load_response->url = url; | 414 sync_load_response->url = url; |
415 std::string data; | 415 std::string data; |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
758 // if the request cannot be serviced from cache. We force the 'DontLoad' | 758 // if the request cannot be serviced from cache. We force the 'DontLoad' |
759 // cache policy at this point to ensure that we never hit the network for | 759 // cache policy at this point to ensure that we never hit the network for |
760 // this request. | 760 // this request. |
761 // | 761 // |
762 DCHECK(request.httpMethod() == "POST"); | 762 DCHECK(request.httpMethod() == "POST"); |
763 request.setCachePolicy(ReturnCacheDataDontLoad); | 763 request.setCachePolicy(ReturnCacheDataDontLoad); |
764 return true; | 764 return true; |
765 } | 765 } |
766 | 766 |
767 } // namespace WebCore | 767 } // namespace WebCore |
OLD | NEW |