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

Side by Side Diff: chrome/browser/ui/webui/settings/system_handler.cc

Issue 1789543003: MD Settings: move AdvancedOptionsUtilities to a settings-accessible place (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/settings/system_handler.h" 5 #include "chrome/browser/ui/webui/settings/system_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/metrics/user_metrics.h" 9 #include "base/metrics/user_metrics.h"
10 #include "base/metrics/user_metrics_action.h" 10 #include "base/metrics/user_metrics_action.h"
11 #include "content/public/browser/web_ui.h" 11 #include "content/public/browser/web_ui.h"
12 12
13 #if !defined(OS_CHROMEOS)
14 #include "chrome/browser/ui/webui/settings_utils.h"
15 #endif
16
13 namespace settings { 17 namespace settings {
14 18
15 SystemHandler::SystemHandler() {} 19 SystemHandler::SystemHandler() {}
16 20
17 SystemHandler::~SystemHandler() {} 21 SystemHandler::~SystemHandler() {}
18 22
19 void SystemHandler::RegisterMessages() { 23 void SystemHandler::RegisterMessages() {
20 web_ui()->RegisterMessageCallback("changeProxySettings", 24 web_ui()->RegisterMessageCallback("changeProxySettings",
21 base::Bind(&SystemHandler::HandleChangeProxySettings, 25 base::Bind(&SystemHandler::HandleChangeProxySettings,
22 base::Unretained(this))); 26 base::Unretained(this)));
23 } 27 }
24 28
25 void SystemHandler::HandleChangeProxySettings(const base::ListValue* /*args*/) { 29 void SystemHandler::HandleChangeProxySettings(const base::ListValue* /*args*/) {
26 base::RecordAction(base::UserMetricsAction("Options_ShowProxySettings")); 30 base::RecordAction(base::UserMetricsAction("Options_ShowProxySettings"));
27 // TODO(dbeam): port AdvancedOptionsUtilities::ShowNetworkProxySettings from 31 #if defined(OS_CHROMEOS)
28 // advanced_options_utils.h to new, settings accessible place. 32 NOTREACHED();
33 #else
34 settings_utils::ShowNetworkProxySettings(web_ui()->GetWebContents());
35 #endif
29 } 36 }
30 37
31 } // namespace settings 38 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698