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/login/password_changed_view.h" | 5 #include "chrome/browser/chromeos/login/password_changed_view.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" | 8 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" |
9 #include "chrome/browser/chromeos/login/textfield_with_margin.h" | 9 #include "chrome/browser/chromeos/login/textfield_with_margin.h" |
10 #include "grit/generated_resources.h" | 10 #include "grit/generated_resources.h" |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 // TODO(nkostylev): Need to sanitize memory used to store password. | 193 // TODO(nkostylev): Need to sanitize memory used to store password. |
194 if (full_sync_radio_->checked()) | 194 if (full_sync_radio_->checked()) |
195 delegate_->ResyncEncryptedData(); | 195 delegate_->ResyncEncryptedData(); |
196 else | 196 else |
197 delegate_->RecoverEncryptedData(UTF16ToUTF8(old_password_field_->text())); | 197 delegate_->RecoverEncryptedData(UTF16ToUTF8(old_password_field_->text())); |
198 | 198 |
199 return true; | 199 return true; |
200 } | 200 } |
201 | 201 |
202 void PasswordChangedView::ButtonPressed(Button* sender, | 202 void PasswordChangedView::ButtonPressed(Button* sender, |
203 const views::Event& event) { | 203 const ui::Event& event) { |
204 if (sender == full_sync_radio_) { | 204 if (sender == full_sync_radio_) { |
205 old_password_field_->SetEnabled(false); | 205 old_password_field_->SetEnabled(false); |
206 old_password_field_->SetText(string16()); | 206 old_password_field_->SetText(string16()); |
207 } else if (sender == delta_sync_radio_) { | 207 } else if (sender == delta_sync_radio_) { |
208 old_password_field_->SetEnabled(true); | 208 old_password_field_->SetEnabled(true); |
209 old_password_field_->RequestFocus(); | 209 old_password_field_->RequestFocus(); |
210 } | 210 } |
211 GetDialogClientView()->UpdateDialogButtons(); | 211 GetDialogClientView()->UpdateDialogButtons(); |
212 } | 212 } |
213 | 213 |
214 void PasswordChangedView::ContentsChanged(views::Textfield* sender, | 214 void PasswordChangedView::ContentsChanged(views::Textfield* sender, |
215 const string16& new_contents) { | 215 const string16& new_contents) { |
216 GetDialogClientView()->UpdateDialogButtons(); | 216 GetDialogClientView()->UpdateDialogButtons(); |
217 } | 217 } |
218 | 218 |
219 bool PasswordChangedView::HandleKeyEvent(views::Textfield* sender, | 219 bool PasswordChangedView::HandleKeyEvent(views::Textfield* sender, |
220 const ui::KeyEvent& keystroke) { | 220 const ui::KeyEvent& keystroke) { |
221 return false; | 221 return false; |
222 } | 222 } |
223 | 223 |
224 } // namespace chromeos | 224 } // namespace chromeos |
OLD | NEW |