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

Side by Side Diff: chrome/browser/ui/android/autofill/autofill_dialog_view_android.cc

Issue 14643007: [rAc Android dialog] Cancelling the editing should reset the manual inputs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/ui/android/autofill/autofill_dialog_view_android.h" 5 #include "chrome/browser/ui/android/autofill/autofill_dialog_view_android.h"
6 #include "base/android/jni_android.h" 6 #include "base/android/jni_android.h"
7 #include "base/android/jni_array.h" 7 #include "base/android/jni_array.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 if (ValidateSection(section, AutofillDialogController::VALIDATE_FINAL)) { 326 if (ValidateSection(section, AutofillDialogController::VALIDATE_FINAL)) {
327 UpdateOrFillSectionToJava(section, false, UNKNOWN_TYPE); 327 UpdateOrFillSectionToJava(section, false, UNKNOWN_TYPE);
328 return true; 328 return true;
329 } 329 }
330 330
331 return false; 331 return false;
332 } 332 }
333 333
334 void AutofillDialogViewAndroid::EditingCancel(JNIEnv* env, 334 void AutofillDialogViewAndroid::EditingCancel(JNIEnv* env,
335 jobject obj, 335 jobject obj,
336 jint section) { 336 jint jsection) {
337 controller_->EditCancelledForSection(static_cast<DialogSection>(section)); 337 const DialogSection section = static_cast<DialogSection>(jsection);
338 controller_->EditCancelledForSection(section);
339 UpdateSection(section);
338 } 340 }
339 341
340 ScopedJavaLocalRef<jstring> AutofillDialogViewAndroid::ValidateField( 342 ScopedJavaLocalRef<jstring> AutofillDialogViewAndroid::ValidateField(
341 JNIEnv* env, 343 JNIEnv* env,
342 jobject obj, 344 jobject obj,
343 jint type, 345 jint type,
344 jstring value) { 346 jstring value) {
345 string16 field_value = base::android::ConvertJavaStringToUTF16(env, value); 347 string16 field_value = base::android::ConvertJavaStringToUTF16(env, value);
346 AutofillFieldType field_type = static_cast<AutofillFieldType>(type); 348 AutofillFieldType field_type = static_cast<AutofillFieldType>(type);
347 if (controller_->InputIsValid(field_type, field_value)) { 349 if (controller_->InputIsValid(field_type, field_value)) {
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 if (label.empty()) 703 if (label.empty())
702 return false; 704 return false;
703 705
704 *label_to_set = label; 706 *label_to_set = label;
705 *sublabel_to_set = sublabel; 707 *sublabel_to_set = sublabel;
706 *icon_to_set = icon; 708 *icon_to_set = icon;
707 return true; 709 return true;
708 } 710 }
709 711
710 } // namespace autofill 712 } // namespace autofill
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