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

Side by Side Diff: chrome/browser/chromeos/options/wifi_config_view.cc

Issue 2952006: WifiConfigView::Init(): Fetch the localized string for the cert... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 10 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/chromeos/options/wifi_config_view.h" 5 #include "chrome/browser/chromeos/options/wifi_config_view.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 std::wstring label = l10n_util::GetString( 261 std::wstring label = l10n_util::GetString(
262 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CERT_INSTALLED); 262 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CERT_INSTALLED);
263 views::Label* cert_text = new views::Label(label); 263 views::Label* cert_text = new views::Label(label);
264 cert_text->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 264 cert_text->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
265 layout->AddView(cert_text); 265 layout->AddView(cert_text);
266 } else { 266 } else {
267 std::wstring label; 267 std::wstring label;
268 if (!certificate_path_.empty()) 268 if (!certificate_path_.empty())
269 label = UTF8ToWide(certificate_path_); 269 label = UTF8ToWide(certificate_path_);
270 else 270 else
271 label = IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CERT_BUTTON; 271 label = l10n_util::GetString(
272 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CERT_BUTTON);
272 certificate_browse_button_ = new views::NativeButton(this, label); 273 certificate_browse_button_ = new views::NativeButton(this, label);
273 layout->AddView(certificate_browse_button_); 274 layout->AddView(certificate_browse_button_);
274 } 275 }
275 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); 276 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
276 } 277 }
277 278
278 // Add passphrase if other_network or wifi is encrypted. 279 // Add passphrase if other_network or wifi is encrypted.
279 if (other_network_ || (wifi_.encrypted() && !certificate_in_pkcs11)) { 280 if (other_network_ || (wifi_.encrypted() && !certificate_in_pkcs11)) {
280 layout->StartRow(0, column_view_set_id); 281 layout->StartRow(0, column_view_set_id);
281 int label_text_id; 282 int label_text_id;
(...skipping 25 matching lines...) Expand all
307 l10n_util::GetString(IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_AUTO_CONNECT)); 308 l10n_util::GetString(IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_AUTO_CONNECT));
308 // For other network, default to autoconnect. 309 // For other network, default to autoconnect.
309 bool autoconnect = other_network_ || wifi_.auto_connect(); 310 bool autoconnect = other_network_ || wifi_.auto_connect();
310 autoconnect_checkbox_->SetChecked(autoconnect); 311 autoconnect_checkbox_->SetChecked(autoconnect);
311 layout->StartRow(0, column_view_set_id); 312 layout->StartRow(0, column_view_set_id);
312 layout->AddView(autoconnect_checkbox_, 3, 1); 313 layout->AddView(autoconnect_checkbox_, 3, 1);
313 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); 314 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
314 } 315 }
315 316
316 } // namespace chromeos 317 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698