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

Unified Diff: chrome/browser/chromeos/ui_proxy_config_service.cc

Issue 289383004: Merge FavoriteState into NetworkState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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: chrome/browser/chromeos/ui_proxy_config_service.cc
diff --git a/chrome/browser/chromeos/ui_proxy_config_service.cc b/chrome/browser/chromeos/ui_proxy_config_service.cc
index 945f4e4b853dff612fda6e455788cb41260f9e11..8f694dd2a5d3f1321fee5149f01521d13baf7a4b 100644
--- a/chrome/browser/chromeos/ui_proxy_config_service.cc
+++ b/chrome/browser/chromeos/ui_proxy_config_service.cc
@@ -9,7 +9,7 @@
#include "base/values.h"
#include "chrome/browser/chromeos/net/proxy_config_handler.h"
#include "chrome/browser/chromeos/proxy_config_service_impl.h"
-#include "chromeos/network/favorite_state.h"
+#include "chromeos/network/network_state.h"
#include "chromeos/network/network_state_handler.h"
#include "grit/generated_resources.h"
#include "net/proxy/proxy_config.h"
@@ -40,11 +40,11 @@ const char* ModeToString(UIProxyConfig::Mode mode) {
// for this network.
bool GetProxyConfig(const PrefService* profile_prefs,
const PrefService* local_state_prefs,
- const FavoriteState& network,
+ const NetworkState& network,
net::ProxyConfig* proxy_config,
onc::ONCSource* onc_source) {
scoped_ptr<ProxyConfigDictionary> proxy_dict =
- proxy_config::GetProxyConfigForFavoriteNetwork(
+ proxy_config::GetProxyConfigForNetwork(
profile_prefs, local_state_prefs, network, onc_source);
if (!proxy_dict)
return false;
@@ -79,13 +79,13 @@ void UIProxyConfigService::SetCurrentNetwork(
}
void UIProxyConfigService::UpdateFromPrefs() {
- const FavoriteState* network = NULL;
+ const NetworkState* network = NULL;
if (!current_ui_network_.empty()) {
network = NetworkHandler::Get()
->network_state_handler()
- ->GetFavoriteStateFromServicePath(current_ui_network_,
- true /* configured_only */);
- LOG_IF(ERROR, !network) << "Couldn't find FavoriteState for network "
+ ->GetNetworkStateFromServicePath(current_ui_network_,
+ true /* configured_only */);
+ LOG_IF(ERROR, !network) << "Couldn't find NetworkState for network "
<< current_ui_network_;
}
if (!network) {
@@ -110,13 +110,13 @@ void UIProxyConfigService::SetProxyConfig(const UIProxyConfig& config) {
if (current_ui_network_.empty())
return;
- const FavoriteState* network =
+ const NetworkState* network =
NetworkHandler::Get()
->network_state_handler()
- ->GetFavoriteStateFromServicePath(current_ui_network_,
- true /* configured_only */);
+ ->GetNetworkStateFromServicePath(current_ui_network_,
+ true /* configured_only */);
if (!network) {
- LOG(ERROR) << "Couldn't find FavoriteState for network "
+ LOG(ERROR) << "Couldn't find NetworkState for network "
<< current_ui_network_;
return;
}
@@ -129,12 +129,12 @@ void UIProxyConfigService::SetProxyConfig(const UIProxyConfig& config) {
VLOG(1) << "Set proxy for " << current_ui_network_
<< " to " << *proxy_config_value;
- proxy_config::SetProxyConfigForFavoriteNetwork(proxy_config_dict, *network);
+ proxy_config::SetProxyConfigForNetwork(proxy_config_dict, *network);
current_ui_config_.state = ProxyPrefs::CONFIG_SYSTEM;
}
void UIProxyConfigService::DetermineEffectiveConfig(
- const FavoriteState& network) {
+ const NetworkState& network) {
DCHECK(local_state_prefs_);
// The pref service to read proxy settings that apply to all networks.

Powered by Google App Engine
This is Rietveld 408576698