| 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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 | 559 |
| 560 // factory function | 560 // factory function |
| 561 ResourceLoaderBridge* ResourceLoaderBridge::Create( | 561 ResourceLoaderBridge* ResourceLoaderBridge::Create( |
| 562 const std::string& method, | 562 const std::string& method, |
| 563 const GURL& url, | 563 const GURL& url, |
| 564 const GURL& policy_url, | 564 const GURL& policy_url, |
| 565 const GURL& referrer, | 565 const GURL& referrer, |
| 566 const std::string& frame_origin, | 566 const std::string& frame_origin, |
| 567 const std::string& main_frame_origin, | 567 const std::string& main_frame_origin, |
| 568 const std::string& headers, | 568 const std::string& headers, |
| 569 const std::string& default_mime_type, |
| 569 int load_flags, | 570 int load_flags, |
| 570 int requestor_pid, | 571 int requestor_pid, |
| 571 ResourceType::Type request_type, | 572 ResourceType::Type request_type, |
| 572 int routing_id) { | 573 int routing_id) { |
| 573 return new ResourceLoaderBridgeImpl(method, url, policy_url, | 574 return new ResourceLoaderBridgeImpl(method, url, policy_url, |
| 574 referrer, headers, load_flags); | 575 referrer, headers, load_flags); |
| 575 } | 576 } |
| 576 | 577 |
| 577 // Issue the proxy resolve request on the io thread, and wait | 578 // Issue the proxy resolve request on the io thread, and wait |
| 578 // for the result. | 579 // for the result. |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 return std::string(); | 644 return std::string(); |
| 644 } | 645 } |
| 645 | 646 |
| 646 scoped_refptr<CookieGetter> getter = new CookieGetter(); | 647 scoped_refptr<CookieGetter> getter = new CookieGetter(); |
| 647 | 648 |
| 648 io_thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod( | 649 io_thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod( |
| 649 getter.get(), &CookieGetter::Get, url)); | 650 getter.get(), &CookieGetter::Get, url)); |
| 650 | 651 |
| 651 return getter->GetResult(); | 652 return getter->GetResult(); |
| 652 } | 653 } |
| OLD | NEW |