| 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 contains an implementation of the ResourceLoaderBridge class. | 5 // This file contains an implementation of the ResourceLoaderBridge class. |
| 6 // The class is implemented using URLRequest, meaning it is a "simple" version | 6 // The class is implemented using URLRequest, meaning it is a "simple" version |
| 7 // that directly issues requests. The more complicated one used in the | 7 // that directly issues requests. The more complicated one used in the |
| 8 // browser uses IPC. | 8 // browser uses IPC. |
| 9 // | 9 // |
| 10 // Because URLRequest only provides an asynchronous resource loading API, this | 10 // Because URLRequest only provides an asynchronous resource loading API, this |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 }; | 533 }; |
| 534 | 534 |
| 535 //----------------------------------------------------------------------------- | 535 //----------------------------------------------------------------------------- |
| 536 | 536 |
| 537 class ResourceLoaderBridgeImpl : public ResourceLoaderBridge { | 537 class ResourceLoaderBridgeImpl : public ResourceLoaderBridge { |
| 538 public: | 538 public: |
| 539 ResourceLoaderBridgeImpl( | 539 ResourceLoaderBridgeImpl( |
| 540 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) | 540 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) |
| 541 : params_(new RequestParams), | 541 : params_(new RequestParams), |
| 542 proxy_(NULL) { | 542 proxy_(NULL) { |
| 543 DCHECK(!request_info.download_to_file); // Not implemented yet! |
| 543 params_->method = request_info.method; | 544 params_->method = request_info.method; |
| 544 params_->url = request_info.url; | 545 params_->url = request_info.url; |
| 545 params_->first_party_for_cookies = request_info.first_party_for_cookies; | 546 params_->first_party_for_cookies = request_info.first_party_for_cookies; |
| 546 params_->referrer = request_info.referrer; | 547 params_->referrer = request_info.referrer; |
| 547 params_->headers = request_info.headers; | 548 params_->headers = request_info.headers; |
| 548 params_->load_flags = request_info.load_flags; | 549 params_->load_flags = request_info.load_flags; |
| 549 params_->request_type = request_info.request_type; | 550 params_->request_type = request_info.request_type; |
| 550 params_->appcache_host_id = request_info.appcache_host_id; | 551 params_->appcache_host_id = request_info.appcache_host_id; |
| 551 } | 552 } |
| 552 | 553 |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 } else { | 818 } else { |
| 818 g_io_thread->SetAcceptAllCookies(accept_all_cookies); | 819 g_io_thread->SetAcceptAllCookies(accept_all_cookies); |
| 819 } | 820 } |
| 820 } | 821 } |
| 821 | 822 |
| 822 // static | 823 // static |
| 823 scoped_refptr<base::MessageLoopProxy> | 824 scoped_refptr<base::MessageLoopProxy> |
| 824 SimpleResourceLoaderBridge::GetCacheThread() { | 825 SimpleResourceLoaderBridge::GetCacheThread() { |
| 825 return g_cache_thread->message_loop_proxy(); | 826 return g_cache_thread->message_loop_proxy(); |
| 826 } | 827 } |
| OLD | NEW |