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

Side by Side Diff: net/proxy/proxy_service.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/proxy/proxy_service.h ('k') | net/proxy/proxy_service_unittest.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 "net/proxy/proxy_service.h" 5 #include "net/proxy/proxy_service.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <winhttp.h> 9 #include <winhttp.h>
10 #endif 10 #endif
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 #else 298 #else
299 // This used to be a NOTIMPLEMENTED(), but that logs as an error, 299 // This used to be a NOTIMPLEMENTED(), but that logs as an error,
300 // screwing up layout tests. 300 // screwing up layout tests.
301 LOG(WARNING) << "Proxies are not implemented; remove me once that's fixed."; 301 LOG(WARNING) << "Proxies are not implemented; remove me once that's fixed.";
302 // http://code.google.com/p/chromium/issues/detail?id=4523 is the bug 302 // http://code.google.com/p/chromium/issues/detail?id=4523 is the bug
303 // to implement this. 303 // to implement this.
304 return new ProxyService(new ProxyResolverNull()); 304 return new ProxyService(new ProxyResolverNull());
305 #endif 305 #endif
306 } 306 }
307 307
308 // static
309 ProxyService* ProxyService::CreateNull() {
310 return new ProxyService(new ProxyResolverNull());
311 }
312
308 int ProxyService::ResolveProxy(const GURL& url, ProxyInfo* result, 313 int ProxyService::ResolveProxy(const GURL& url, ProxyInfo* result,
309 CompletionCallback* callback, 314 CompletionCallback* callback,
310 PacRequest** pac_request) { 315 PacRequest** pac_request) {
311 // The overhead of calling WinHttpGetIEProxyConfigForCurrentUser is very low. 316 // The overhead of calling WinHttpGetIEProxyConfigForCurrentUser is very low.
312 const TimeDelta kProxyConfigMaxAge = TimeDelta::FromSeconds(5); 317 const TimeDelta kProxyConfigMaxAge = TimeDelta::FromSeconds(5);
313 318
314 // Periodically check for a new config. 319 // Periodically check for a new config.
315 if (!config_has_been_updated_ || 320 if (!config_has_been_updated_ ||
316 (TimeTicks::Now() - config_last_update_time_) > kProxyConfigMaxAge) 321 (TimeTicks::Now() - config_last_update_time_) > kProxyConfigMaxAge)
317 UpdateConfig(); 322 UpdateConfig();
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 // http://www.tcd.ie/iss/internet/osx_proxy.php for a real-world example). 541 // http://www.tcd.ie/iss/internet/osx_proxy.php for a real-world example).
537 // That's kinda cool so we'll provide that for everyone. 542 // That's kinda cool so we'll provide that for everyone.
538 // TODO(avi): implement here 543 // TODO(avi): implement here
539 } 544 }
540 545
541 return false; 546 return false;
542 } 547 }
543 548
544 } // namespace net 549 } // namespace net
545 550
OLDNEW
« no previous file with comments | « net/proxy/proxy_service.h ('k') | net/proxy/proxy_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698