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

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

Issue 8102019: redesign and reimplement proxy config service and tracker, revise proxy ui on cros (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/options/chromeos/proxy_handler.h" 5 #include "chrome/browser/ui/webui/options/chromeos/proxy_handler.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/time.h" 10 #include "base/time.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "chrome/browser/chromeos/proxy_cros_settings_provider.h" 13 #include "chrome/browser/chromeos/proxy_cros_settings_provider.h"
14 #include "grit/chromium_strings.h" 14 #include "grit/chromium_strings.h"
15 #include "grit/generated_resources.h" 15 #include "grit/generated_resources.h"
16 #include "grit/locale_settings.h" 16 #include "grit/locale_settings.h"
17 #include "grit/theme_resources.h" 17 #include "grit/theme_resources.h"
18 #include "ui/base/l10n/l10n_util.h" 18 #include "ui/base/l10n/l10n_util.h"
19 #include "ui/base/resource/resource_bundle.h" 19 #include "ui/base/resource/resource_bundle.h"
20 20
21 namespace chromeos { 21 namespace chromeos {
22 22
23 ProxyHandler::ProxyHandler() 23 ProxyHandler::ProxyHandler(Profile* profile)
24 : CrosOptionsPageUIHandler(new ProxyCrosSettingsProvider()) { 24 : CrosOptionsPageUIHandler(new ProxyCrosSettingsProvider(profile)) {
25 } 25 }
26 26
27 ProxyHandler::~ProxyHandler() { 27 ProxyHandler::~ProxyHandler() {
28 } 28 }
29 29
30 void ProxyHandler::GetLocalizedValues( 30 void ProxyHandler::GetLocalizedValues(
31 DictionaryValue* localized_strings) { 31 DictionaryValue* localized_strings) {
32 DCHECK(localized_strings); 32 DCHECK(localized_strings);
33 // Proxy page - ChromeOS 33 // Proxy page - ChromeOS
34 localized_strings->SetString("proxyPage", 34 localized_strings->SetString("proxyPage",
(...skipping 25 matching lines...) Expand all
60 localized_strings->SetString("advanced_proxy_config", 60 localized_strings->SetString("advanced_proxy_config",
61 l10n_util::GetStringUTF16(IDS_PROXY_ADVANCED_CONFIG)); 61 l10n_util::GetStringUTF16(IDS_PROXY_ADVANCED_CONFIG));
62 localized_strings->SetString("addHost", 62 localized_strings->SetString("addHost",
63 l10n_util::GetStringUTF16(IDS_PROXY_ADD_HOST)); 63 l10n_util::GetStringUTF16(IDS_PROXY_ADD_HOST));
64 localized_strings->SetString("removeHost", 64 localized_strings->SetString("removeHost",
65 l10n_util::GetStringUTF16(IDS_PROXY_REMOVE_HOST)); 65 l10n_util::GetStringUTF16(IDS_PROXY_REMOVE_HOST));
66 localized_strings->SetString("proxyPort", 66 localized_strings->SetString("proxyPort",
67 l10n_util::GetStringUTF16(IDS_PROXY_PORT)); 67 l10n_util::GetStringUTF16(IDS_PROXY_PORT));
68 localized_strings->SetString("proxyBypass", 68 localized_strings->SetString("proxyBypass",
69 l10n_util::GetStringUTF16(IDS_PROXY_BYPASS)); 69 l10n_util::GetStringUTF16(IDS_PROXY_BYPASS));
70 localized_strings->SetString("policyManagedPrefsBannerText",
71 l10n_util::GetStringUTF16(IDS_OPTIONS_POLICY_MANAGED_PREFS));
72 localized_strings->SetString("extensionManagedPrefsBannerText",
73 l10n_util::GetStringUTF16(IDS_OPTIONS_EXTENSION_MANAGED_PREFS));
74 localized_strings->SetString("unmodifiablePrefsBannerText",
75 l10n_util::GetStringUTF16(IDS_OPTIONS_UNMODIFIABLE_PREFS));
76 localized_strings->SetString("enableSharedProxiesBannerText",
77 l10n_util::GetStringFUTF16(
78 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_ENABLE_SHARED_PROXIES_HINT,
79 l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_USE_SHARED_PROXIES)));
70 } 80 }
71 81
72 void ProxyHandler::SetNetworkName(const std::string& name) { 82 void ProxyHandler::SetNetworkName(const std::string& name) {
73 StringValue network(name); 83 StringValue network(name);
74 web_ui_->CallJavascriptFunction("options.ProxyOptions.setNetworkName", 84 web_ui_->CallJavascriptFunction("options.ProxyOptions.setNetworkName",
75 network); 85 network);
76 } 86 }
77 87
78 } // namespace chromeos 88 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698