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

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

Issue 1273013004: Returning scoped_ptr<> instead of raw pointer in DhcpProxyScriptFetcherFactory::Create (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « net/proxy/proxy_service.h ('k') | net/proxy/proxy_service_mojo.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 ApplyProxyConfigIfAvailable(); 1433 ApplyProxyConfigIfAvailable();
1434 } 1434 }
1435 } 1435 }
1436 1436
1437 net_log.EndEvent(NetLog::TYPE_PROXY_SERVICE); 1437 net_log.EndEvent(NetLog::TYPE_PROXY_SERVICE);
1438 return result_code; 1438 return result_code;
1439 } 1439 }
1440 1440
1441 void ProxyService::SetProxyScriptFetchers( 1441 void ProxyService::SetProxyScriptFetchers(
1442 ProxyScriptFetcher* proxy_script_fetcher, 1442 ProxyScriptFetcher* proxy_script_fetcher,
1443 DhcpProxyScriptFetcher* dhcp_proxy_script_fetcher) { 1443 scoped_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher) {
1444 DCHECK(CalledOnValidThread()); 1444 DCHECK(CalledOnValidThread());
1445 State previous_state = ResetProxyConfig(false); 1445 State previous_state = ResetProxyConfig(false);
1446 proxy_script_fetcher_.reset(proxy_script_fetcher); 1446 proxy_script_fetcher_.reset(proxy_script_fetcher);
1447 dhcp_proxy_script_fetcher_.reset(dhcp_proxy_script_fetcher); 1447 dhcp_proxy_script_fetcher_ = dhcp_proxy_script_fetcher.Pass();
1448 if (previous_state != STATE_NONE) 1448 if (previous_state != STATE_NONE)
1449 ApplyProxyConfigIfAvailable(); 1449 ApplyProxyConfigIfAvailable();
1450 } 1450 }
1451 1451
1452 ProxyScriptFetcher* ProxyService::GetProxyScriptFetcher() const { 1452 ProxyScriptFetcher* ProxyService::GetProxyScriptFetcher() const {
1453 DCHECK(CalledOnValidThread()); 1453 DCHECK(CalledOnValidThread());
1454 return proxy_script_fetcher_.get(); 1454 return proxy_script_fetcher_.get();
1455 } 1455 }
1456 1456
1457 ProxyService::State ProxyService::ResetProxyConfig(bool reset_fetched_config) { 1457 ProxyService::State ProxyService::ResetProxyConfig(bool reset_fetched_config) {
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1646 State previous_state = ResetProxyConfig(false); 1646 State previous_state = ResetProxyConfig(false);
1647 if (previous_state != STATE_NONE) 1647 if (previous_state != STATE_NONE)
1648 ApplyProxyConfigIfAvailable(); 1648 ApplyProxyConfigIfAvailable();
1649 } 1649 }
1650 1650
1651 void ProxyService::OnDNSChanged() { 1651 void ProxyService::OnDNSChanged() {
1652 OnIPAddressChanged(); 1652 OnIPAddressChanged();
1653 } 1653 }
1654 1654
1655 } // namespace net 1655 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_service.h ('k') | net/proxy/proxy_service_mojo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698