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

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

Issue 238433003: Provide Shill IP Address to myIpAddress() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
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 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after
1477 } 1477 }
1478 1478
1479 void ProxyService::InitializeUsingLastFetchedConfig() { 1479 void ProxyService::InitializeUsingLastFetchedConfig() {
1480 ResetProxyConfig(false); 1480 ResetProxyConfig(false);
1481 1481
1482 DCHECK(fetched_config_.is_valid()); 1482 DCHECK(fetched_config_.is_valid());
1483 1483
1484 // Increment the ID to reflect that the config has changed. 1484 // Increment the ID to reflect that the config has changed.
1485 fetched_config_.set_id(next_config_id_++); 1485 fetched_config_.set_id(next_config_id_++);
1486 1486
1487 resolver_->set_default_my_ip_address(fetched_config_.my_ip_address());
1488
1487 if (!fetched_config_.HasAutomaticSettings()) { 1489 if (!fetched_config_.HasAutomaticSettings()) {
1488 config_ = fetched_config_; 1490 config_ = fetched_config_;
1489 SetReady(); 1491 SetReady();
1490 return; 1492 return;
1491 } 1493 }
1492 1494
1493 // Start downloading + testing the PAC scripts for this new configuration. 1495 // Start downloading + testing the PAC scripts for this new configuration.
1494 current_state_ = STATE_WAITING_FOR_INIT_PROXY_RESOLVER; 1496 current_state_ = STATE_WAITING_FOR_INIT_PROXY_RESOLVER;
1495 1497
1496 // If we changed networks recently, we should delay running proxy auto-config. 1498 // If we changed networks recently, we should delay running proxy auto-config.
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1616 OnCompletion(result_); 1618 OnCompletion(result_);
1617 } 1619 }
1618 } 1620 }
1619 1621
1620 void SyncProxyServiceHelper::OnCompletion(int rv) { 1622 void SyncProxyServiceHelper::OnCompletion(int rv) {
1621 result_ = rv; 1623 result_ = rv;
1622 event_.Signal(); 1624 event_.Signal();
1623 } 1625 }
1624 1626
1625 } // namespace net 1627 } // namespace net
OLDNEW
« net/proxy/proxy_resolver_v8.cc ('K') | « net/proxy/proxy_resolver_v8.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698