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 #include "webkit/glue/plugins/mozilla_extensions.h" | 5 #include "webkit/glue/plugins/mozilla_extensions.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 bool MozillaExtensionApi::FindProxyForUrl(const char* url, | 36 bool MozillaExtensionApi::FindProxyForUrl(const char* url, |
37 std::string* proxy) { | 37 std::string* proxy) { |
38 bool result = false; | 38 bool result = false; |
39 | 39 |
40 if ((!url) || (!proxy)) { | 40 if ((!url) || (!proxy)) { |
41 NOTREACHED(); | 41 NOTREACHED(); |
42 return result; | 42 return result; |
43 } | 43 } |
44 | 44 |
45 scoped_ptr<net::ProxyService> proxy_service(net::ProxyService::Create(NULL)); | 45 scoped_refptr<net::ProxyService> proxy_service( |
| 46 net::ProxyService::Create(NULL)); |
46 if (!proxy_service.get()) { | 47 if (!proxy_service.get()) { |
47 NOTREACHED(); | 48 NOTREACHED(); |
48 return result; | 49 return result; |
49 } | 50 } |
50 | 51 |
51 net::ProxyInfo proxy_info; | 52 net::ProxyInfo proxy_info; |
52 if (proxy_service->ResolveProxy(GURL(std::string(url)), | 53 if (proxy_service->ResolveProxy(GURL(std::string(url)), |
53 &proxy_info, | 54 &proxy_info, |
54 NULL, | 55 NULL, |
55 NULL) == net::OK) { | 56 NULL) == net::OK) { |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 GURL cookies_url((std::string(url))); | 363 GURL cookies_url((std::string(url))); |
363 webplugin->SetCookie(cookies_url, | 364 webplugin->SetCookie(cookies_url, |
364 cookies_url, | 365 cookies_url, |
365 cookie); | 366 cookie); |
366 return NS_OK; | 367 return NS_OK; |
367 } | 368 } |
368 | 369 |
369 | 370 |
370 } // namespace NPAPI | 371 } // namespace NPAPI |
371 | 372 |
OLD | NEW |