| 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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 // Issue the proxy resolve request on the io thread, and wait | 621 // Issue the proxy resolve request on the io thread, and wait |
| 622 // for the result. | 622 // for the result. |
| 623 bool FindProxyForUrl(const GURL& url, std::string* proxy_list) { | 623 bool FindProxyForUrl(const GURL& url, std::string* proxy_list) { |
| 624 DCHECK(request_context); | 624 DCHECK(request_context); |
| 625 | 625 |
| 626 scoped_refptr<net::SyncProxyServiceHelper> sync_proxy_service( | 626 scoped_refptr<net::SyncProxyServiceHelper> sync_proxy_service( |
| 627 new net::SyncProxyServiceHelper(io_thread->message_loop(), | 627 new net::SyncProxyServiceHelper(io_thread->message_loop(), |
| 628 request_context->proxy_service())); | 628 request_context->proxy_service())); |
| 629 | 629 |
| 630 net::ProxyInfo proxy_info; | 630 net::ProxyInfo proxy_info; |
| 631 int rv = sync_proxy_service->ResolveProxy(url, &proxy_info); | 631 int rv = sync_proxy_service->ResolveProxy(NULL, url, &proxy_info); |
| 632 if (rv == net::OK) { | 632 if (rv == net::OK) { |
| 633 *proxy_list = proxy_info.ToPacString(); | 633 *proxy_list = proxy_info.ToPacString(); |
| 634 } | 634 } |
| 635 | 635 |
| 636 return rv == net::OK; | 636 return rv == net::OK; |
| 637 } | 637 } |
| 638 | 638 |
| 639 } // namespace webkit_glue | 639 } // namespace webkit_glue |
| 640 | 640 |
| 641 //----------------------------------------------------------------------------- | 641 //----------------------------------------------------------------------------- |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 return std::string(); | 688 return std::string(); |
| 689 } | 689 } |
| 690 | 690 |
| 691 scoped_refptr<CookieGetter> getter = new CookieGetter(); | 691 scoped_refptr<CookieGetter> getter = new CookieGetter(); |
| 692 | 692 |
| 693 io_thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod( | 693 io_thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod( |
| 694 getter.get(), &CookieGetter::Get, url)); | 694 getter.get(), &CookieGetter::Get, url)); |
| 695 | 695 |
| 696 return getter->GetResult(); | 696 return getter->GetResult(); |
| 697 } | 697 } |
| OLD | NEW |