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

Unified Diff: net/proxy/proxy_config_service_mac.cc

Issue 6597070: Allow ProxyConfigService to report "no configuration set" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix fallback Created 9 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 side-by-side diff with in-line comments
Download patch
Index: net/proxy/proxy_config_service_mac.cc
diff --git a/net/proxy/proxy_config_service_mac.cc b/net/proxy/proxy_config_service_mac.cc
index 3dacf777a244df2ca31b6f8e3fe57c0764c371d3..ffc9c77867b84d25a27df4be5915f643431508ba 100644
--- a/net/proxy/proxy_config_service_mac.cc
+++ b/net/proxy/proxy_config_service_mac.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -210,7 +210,8 @@ void ProxyConfigServiceMac::RemoveObserver(Observer* observer) {
observers_.RemoveObserver(observer);
}
-bool ProxyConfigServiceMac::GetLatestProxyConfig(ProxyConfig* config) {
+net::ProxyConfigService::ConfigAvailability
+ ProxyConfigServiceMac::GetLatestProxyConfig(ProxyConfig* config) {
DCHECK_EQ(io_loop_, MessageLoop::current());
// Lazy-initialize by fetching the proxy setting from this thread.
@@ -220,7 +221,7 @@ bool ProxyConfigServiceMac::GetLatestProxyConfig(ProxyConfig* config) {
}
*config = last_config_fetched_;
- return has_fetched_config_;
+ return has_fetched_config_ ? CONFIG_VALID : CONFIG_PENDING;
}
void ProxyConfigServiceMac::SetDynamicStoreNotificationKeys(
@@ -262,7 +263,8 @@ void ProxyConfigServiceMac::OnProxyConfigChanged(
last_config_fetched_ = new_config;
// Notify all the observers.
- FOR_EACH_OBSERVER(Observer, observers_, OnProxyConfigChanged(new_config));
+ FOR_EACH_OBSERVER(Observer, observers_,
+ OnProxyConfigChanged(new_config, CONFIG_VALID));
}
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698