OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/passphrase_textfield.h" | 5 #include "chrome/browser/chromeos/options/passphrase_textfield.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 | 8 |
9 namespace chromeos { | 9 namespace chromeos { |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 if (show_fake_ && text().empty()) | 34 if (show_fake_ && text().empty()) |
35 SetFakePassphrase(); | 35 SetFakePassphrase(); |
36 Textfield::OnBlur(); | 36 Textfield::OnBlur(); |
37 } | 37 } |
38 | 38 |
39 std::string PassphraseTextfield::GetPassphrase() { | 39 std::string PassphraseTextfield::GetPassphrase() { |
40 return changed_ ? UTF16ToUTF8(text()) : std::string(); | 40 return changed_ ? UTF16ToUTF8(text()) : std::string(); |
41 } | 41 } |
42 | 42 |
43 void PassphraseTextfield::SetFakePassphrase() { | 43 void PassphraseTextfield::SetFakePassphrase() { |
44 CR_DEFINE_STATIC_LOCAL(string16, fake_passphrase, (ASCIIToUTF16("********"))); | 44 CR_DEFINE_STATIC_LOCAL(base::string16, fake_passphrase, |
| 45 (ASCIIToUTF16("********"))); |
45 SetText(fake_passphrase); | 46 SetText(fake_passphrase); |
46 changed_ = false; | 47 changed_ = false; |
47 } | 48 } |
48 | 49 |
49 void PassphraseTextfield::ClearFakePassphrase() { | 50 void PassphraseTextfield::ClearFakePassphrase() { |
50 SetText(string16()); | 51 SetText(base::string16()); |
51 changed_ = true; | 52 changed_ = true; |
52 } | 53 } |
53 | 54 |
54 } // namespace chromeos | 55 } // namespace chromeos |
OLD | NEW |