Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: webkit/glue/plugins/mozilla_extensions.cc

Issue 13701: Use automatic memory management for URLRequestContext's members.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/url_request/url_request_unittest.cc ('k') | webkit/tools/test_shell/plugin_tests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/url_request/url_request_unittest.cc ('k') | webkit/tools/test_shell/plugin_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698