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

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

Issue 6246036: FilePath: Remove most of ToWStringHack, adding a LossyDisplayName() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bug link Created 9 years, 10 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 | « base/file_util_unittest.cc ('k') | chrome/browser/diagnostics/recon_diagnostics.cc » ('j') | 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) 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/chromeos/options/wifi_config_view.h" 5 #include "chrome/browser/chromeos/options/wifi_config_view.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/chromeos/cros/cros_library.h" 9 #include "chrome/browser/chromeos/cros/cros_library.h"
10 #include "chrome/browser/chromeos/login/user_manager.h" 10 #include "chrome/browser/chromeos/login/user_manager.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 passphrase_textfield_->SetText(string16()); 187 passphrase_textfield_->SetText(string16());
188 } else { 188 } else {
189 passphrase_textfield_->SetEnabled(true); 189 passphrase_textfield_->SetEnabled(true);
190 } 190 }
191 UpdateCanLogin(); 191 UpdateCanLogin();
192 } 192 }
193 193
194 void WifiConfigView::FileSelected(const FilePath& path, 194 void WifiConfigView::FileSelected(const FilePath& path,
195 int index, void* params) { 195 int index, void* params) {
196 certificate_path_ = path.value(); 196 certificate_path_ = path.value();
197 if (certificate_browse_button_) 197 if (certificate_browse_button_) {
198 certificate_browse_button_->SetLabel(path.BaseName().ToWStringHack()); 198 certificate_browse_button_->SetLabel(
199 UTF16ToWide(path.BaseName().LossyDisplayName()));
200 }
199 UpdateCanLogin(); // TODO(njw) Check if the passphrase decrypts the key. 201 UpdateCanLogin(); // TODO(njw) Check if the passphrase decrypts the key.
200 } 202 }
201 203
202 bool WifiConfigView::Login() { 204 bool WifiConfigView::Login() {
203 std::string identity_string; 205 std::string identity_string;
204 if (identity_textfield_ != NULL) { 206 if (identity_textfield_ != NULL) {
205 identity_string = UTF16ToUTF8(identity_textfield_->text()); 207 identity_string = UTF16ToUTF8(identity_textfield_->text());
206 } 208 }
207 NetworkLibrary* cros = CrosLibrary::Get()->GetNetworkLibrary(); 209 NetworkLibrary* cros = CrosLibrary::Get()->GetNetworkLibrary();
208 bool connected = false; 210 bool connected = false;
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 error_label_ = new views::Label(); 410 error_label_ = new views::Label();
409 error_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 411 error_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
410 error_label_->SetColor(SK_ColorRED); 412 error_label_->SetColor(SK_ColorRED);
411 layout->AddView(error_label_); 413 layout->AddView(error_label_);
412 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); 414 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
413 // Set or hide the error text. 415 // Set or hide the error text.
414 UpdateErrorLabel(false); 416 UpdateErrorLabel(false);
415 } 417 }
416 418
417 } // namespace chromeos 419 } // namespace chromeos
OLDNEW
« no previous file with comments | « base/file_util_unittest.cc ('k') | chrome/browser/diagnostics/recon_diagnostics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698