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

Side by Side Diff: net/proxy/proxy_resolver_mac.cc

Issue 848006: Generalize the net module's LoadLog facility from a passive container, to an event stream (NetLog). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Split up RequestTracker into ConnectJobTracker+RequestTracker+RequestTrackerBase, address comments Created 10 years, 9 months 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/proxy/proxy_resolver_mac.h ('k') | net/proxy/proxy_resolver_v8.h » ('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) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "net/proxy/proxy_resolver_mac.h" 5 #include "net/proxy/proxy_resolver_mac.h"
6 6
7 #include <CoreFoundation/CoreFoundation.h> 7 #include <CoreFoundation/CoreFoundation.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac_util.h" 10 #include "base/mac_util.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } // namespace 52 } // namespace
53 53
54 namespace net { 54 namespace net {
55 55
56 // Gets the proxy information for a query URL from a PAC. Implementation 56 // Gets the proxy information for a query URL from a PAC. Implementation
57 // inspired by http://developer.apple.com/samplecode/CFProxySupportTool/ 57 // inspired by http://developer.apple.com/samplecode/CFProxySupportTool/
58 int ProxyResolverMac::GetProxyForURL(const GURL& query_url, 58 int ProxyResolverMac::GetProxyForURL(const GURL& query_url,
59 ProxyInfo* results, 59 ProxyInfo* results,
60 CompletionCallback* /*callback*/, 60 CompletionCallback* /*callback*/,
61 RequestHandle* /*request*/, 61 RequestHandle* /*request*/,
62 LoadLog* load_log) { 62 const BoundNetLog& net_log) {
63 scoped_cftyperef<CFStringRef> query_ref( 63 scoped_cftyperef<CFStringRef> query_ref(
64 base::SysUTF8ToCFStringRef(query_url.spec())); 64 base::SysUTF8ToCFStringRef(query_url.spec()));
65 scoped_cftyperef<CFURLRef> query_url_ref( 65 scoped_cftyperef<CFURLRef> query_url_ref(
66 CFURLCreateWithString(kCFAllocatorDefault, 66 CFURLCreateWithString(kCFAllocatorDefault,
67 query_ref.get(), 67 query_ref.get(),
68 NULL)); 68 NULL));
69 if (!query_url_ref.get()) 69 if (!query_url_ref.get())
70 return ERR_FAILED; 70 return ERR_FAILED;
71 scoped_cftyperef<CFStringRef> pac_ref( 71 scoped_cftyperef<CFStringRef> pac_ref(
72 base::SysUTF8ToCFStringRef(pac_url_.spec())); 72 base::SysUTF8ToCFStringRef(pac_url_.spec()));
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 163 }
164 164
165 if (!proxy_uri_list.empty()) 165 if (!proxy_uri_list.empty())
166 results->UseNamedProxy(proxy_uri_list); 166 results->UseNamedProxy(proxy_uri_list);
167 // Else do nothing (results is already guaranteed to be in the default state). 167 // Else do nothing (results is already guaranteed to be in the default state).
168 168
169 return OK; 169 return OK;
170 } 170 }
171 171
172 } // namespace net 172 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_resolver_mac.h ('k') | net/proxy/proxy_resolver_v8.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698