| 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 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 // factory function | 545 // factory function |
| 546 ResourceLoaderBridge* ResourceLoaderBridge::Create( | 546 ResourceLoaderBridge* ResourceLoaderBridge::Create( |
| 547 WebFrame* webframe, | 547 WebFrame* webframe, |
| 548 const std::string& method, | 548 const std::string& method, |
| 549 const GURL& url, | 549 const GURL& url, |
| 550 const GURL& policy_url, | 550 const GURL& policy_url, |
| 551 const GURL& referrer, | 551 const GURL& referrer, |
| 552 const std::string& headers, | 552 const std::string& headers, |
| 553 int load_flags, | 553 int load_flags, |
| 554 int origin_pid, | 554 int origin_pid, |
| 555 ResourceType::Type request_type, | 555 ResourceType::Type request_type) { |
| 556 bool mixed_contents) { | |
| 557 return new ResourceLoaderBridgeImpl(method, url, policy_url, referrer, | 556 return new ResourceLoaderBridgeImpl(method, url, policy_url, referrer, |
| 558 headers, load_flags); | 557 headers, load_flags); |
| 559 } | 558 } |
| 560 | 559 |
| 561 // Issue the proxy resolve request on the io thread, and wait | 560 // Issue the proxy resolve request on the io thread, and wait |
| 562 // for the result. | 561 // for the result. |
| 563 bool FindProxyForUrl(const GURL& url, std::string* proxy_list) { | 562 bool FindProxyForUrl(const GURL& url, std::string* proxy_list) { |
| 564 DCHECK(request_context); | 563 DCHECK(request_context); |
| 565 | 564 |
| 566 scoped_refptr<net::SyncProxyServiceHelper> sync_proxy_service( | 565 scoped_refptr<net::SyncProxyServiceHelper> sync_proxy_service( |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 return std::string(); | 626 return std::string(); |
| 628 } | 627 } |
| 629 | 628 |
| 630 scoped_refptr<CookieGetter> getter = new CookieGetter(); | 629 scoped_refptr<CookieGetter> getter = new CookieGetter(); |
| 631 | 630 |
| 632 io_thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod( | 631 io_thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod( |
| 633 getter.get(), &CookieGetter::Get, url)); | 632 getter.get(), &CookieGetter::Get, url)); |
| 634 | 633 |
| 635 return getter->GetResult(); | 634 return getter->GetResult(); |
| 636 } | 635 } |
| OLD | NEW |