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

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

Issue 9814030: get rid of old options pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixes Created 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/webui/options/chromeos/proxy_handler.h"
6
7 #include "base/basictypes.h"
8 #include "base/callback.h"
9 #include "base/stl_util.h"
10 #include "base/time.h"
11 #include "base/utf_string_conversions.h"
12 #include "base/values.h"
13 #include "content/public/browser/web_ui.h"
14 #include "grit/chromium_strings.h"
15 #include "grit/generated_resources.h"
16 #include "grit/locale_settings.h"
17 #include "grit/theme_resources.h"
18 #include "ui/base/l10n/l10n_util.h"
19 #include "ui/base/resource/resource_bundle.h"
20
21 namespace chromeos {
22
23 ProxyHandler::ProxyHandler() {
24 }
25
26 ProxyHandler::~ProxyHandler() {
27 }
28
29 void ProxyHandler::GetLocalizedValues(
30 DictionaryValue* localized_strings) {
31 DCHECK(localized_strings);
32 // Proxy page - ChromeOS
33 localized_strings->SetString("proxyPage",
34 l10n_util::GetStringUTF16(IDS_OPTIONS_PROXY_TAB_LABEL));
35 localized_strings->SetString("proxyPageTitleFormat",
36 l10n_util::GetStringUTF16(IDS_PROXY_PAGE_TITLE_FORMAT));
37 localized_strings->SetString("proxy_config_title",
38 l10n_util::GetStringUTF16(IDS_PROXY_CONFIG_TITLE));
39 localized_strings->SetString("proxyDirectInternetConnection",
40 l10n_util::GetStringUTF16(IDS_PROXY_DIRECT_CONNECTION));
41
42 localized_strings->SetString("proxyManual",
43 l10n_util::GetStringUTF16(IDS_PROXY_MANUAL_CONFIG));
44 localized_strings->SetString("sameProxyProtocols",
45 l10n_util::GetStringUTF16(IDS_PROXY_SAME_FORALL));
46
47 localized_strings->SetString("httpProxy",
48 l10n_util::GetStringUTF16(IDS_PROXY_HTTP_PROXY));
49 localized_strings->SetString("secureHttpProxy",
50 l10n_util::GetStringUTF16(IDS_PROXY_HTTP_SECURE_HTTP_PROXY));
51 localized_strings->SetString("ftpProxy",
52 l10n_util::GetStringUTF16(IDS_PROXY_FTP_PROXY));
53 localized_strings->SetString("socksHost",
54 l10n_util::GetStringUTF16(IDS_PROXY_SOCKS_HOST));
55 localized_strings->SetString("proxyAutomatic",
56 l10n_util::GetStringUTF16(IDS_PROXY_AUTOMATIC));
57 localized_strings->SetString("proxyConfigUrl",
58 l10n_util::GetStringUTF16(IDS_PROXY_CONFIG_URL));
59 localized_strings->SetString("advanced_proxy_config",
60 l10n_util::GetStringUTF16(IDS_PROXY_ADVANCED_CONFIG));
61 localized_strings->SetString("addHost",
62 l10n_util::GetStringUTF16(IDS_PROXY_ADD_HOST));
63 localized_strings->SetString("removeHost",
64 l10n_util::GetStringUTF16(IDS_PROXY_REMOVE_HOST));
65 localized_strings->SetString("proxyPort",
66 l10n_util::GetStringUTF16(IDS_PROXY_PORT));
67 localized_strings->SetString("proxyBypass",
68 l10n_util::GetStringUTF16(IDS_PROXY_BYPASS));
69 localized_strings->SetString("policyManagedPrefsBannerText",
70 l10n_util::GetStringUTF16(IDS_OPTIONS_POLICY_MANAGED_PREFS));
71 localized_strings->SetString("extensionManagedPrefsBannerText",
72 l10n_util::GetStringUTF16(IDS_OPTIONS_EXTENSION_MANAGED_PREFS));
73 localized_strings->SetString("unmodifiablePrefsBannerText",
74 l10n_util::GetStringUTF16(IDS_OPTIONS_UNMODIFIABLE_PREFS));
75 localized_strings->SetString("enableSharedProxiesBannerText",
76 l10n_util::GetStringFUTF16(
77 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_ENABLE_SHARED_PROXIES_HINT,
78 l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_USE_SHARED_PROXIES)));
79 }
80
81 void ProxyHandler::SetNetworkName(const std::string& name) {
82 StringValue network(name);
83 web_ui()->CallJavascriptFunction("options.ProxyOptions.setNetworkName",
84 network);
85 }
86
87 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698