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

Side by Side Diff: chrome/browser/ui/webui/chromeos/proxy_settings_ui.cc

Issue 14846004: Migrate ProxyConfigServiceImpl to NetworkStateHandler and NetworkProfileHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 7 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 "chrome/browser/ui/webui/chromeos/proxy_settings_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/proxy_settings_ui.h"
6 6
7 #include "base/memory/ref_counted_memory.h" 7 #include "base/memory/ref_counted_memory.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/browser/chromeos/proxy_config_service_impl.h" 11 #include "chrome/browser/chromeos/proxy_config_service_impl.h"
12 #include "chrome/browser/chromeos/settings/cros_settings.h" 12 #include "chrome/browser/chromeos/settings/cros_settings.h"
13 #include "chrome/browser/chromeos/system/statistics_provider.h" 13 #include "chrome/browser/chromeos/system/statistics_provider.h"
14 #include "chrome/browser/chromeos/ui_proxy_config_service.h"
14 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler .h" 16 #include "chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler .h"
16 #include "chrome/browser/ui/webui/options/chromeos/proxy_handler.h" 17 #include "chrome/browser/ui/webui/options/chromeos/proxy_handler.h"
17 #include "chrome/common/chrome_constants.h" 18 #include "chrome/common/chrome_constants.h"
18 #include "chrome/common/url_constants.h" 19 #include "chrome/common/url_constants.h"
19 #include "chromeos/chromeos_constants.h" 20 #include "chromeos/chromeos_constants.h"
20 #include "content/public/browser/url_data_source.h" 21 #include "content/public/browser/url_data_source.h"
21 #include "content/public/browser/web_contents.h" 22 #include "content/public/browser/web_contents.h"
22 #include "content/public/browser/web_ui.h" 23 #include "content/public/browser/web_ui.h"
23 #include "content/public/browser/web_ui_message_handler.h" 24 #include "content/public/browser/web_ui_message_handler.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 core_handler_->Uninitialize(); 120 core_handler_->Uninitialize();
120 proxy_handler_->Uninitialize(); 121 proxy_handler_->Uninitialize();
121 } 122 }
122 123
123 void ProxySettingsUI::InitializeHandlers() { 124 void ProxySettingsUI::InitializeHandlers() {
124 core_handler_->InitializeHandler(); 125 core_handler_->InitializeHandler();
125 proxy_handler_->InitializeHandler(); 126 proxy_handler_->InitializeHandler();
126 core_handler_->InitializePage(); 127 core_handler_->InitializePage();
127 proxy_handler_->InitializePage(); 128 proxy_handler_->InitializePage();
128 Profile* profile = Profile::FromWebUI(web_ui()); 129 Profile* profile = Profile::FromWebUI(web_ui());
129 PrefProxyConfigTracker* proxy_tracker = profile->GetProxyConfigTracker(); 130 UIProxyConfigService& proxy_config_service =
130 proxy_tracker->UIMakeActiveNetworkCurrent(); 131 profile->GetProxyConfigTracker()->GetUIService();
132 proxy_config_service.MakeActiveNetworkCurrent();
131 std::string network_name; 133 std::string network_name;
132 proxy_tracker->UIGetCurrentNetworkName(&network_name); 134 proxy_config_service.GetCurrentNetworkName(&network_name);
133 } 135 }
134 136
135 } // namespace chromeos 137 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698