Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ | 6 #define CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ |
| 7 | 7 |
| 8 #include "base/android/jni_weak_ref.h" | 8 #include "base/android/jni_weak_ref.h" |
| 9 #include "base/android/scoped_java_ref.h" | 9 #include "base/android/scoped_java_ref.h" |
| 10 #include "components/autofill/core/browser/personal_data_manager.h" | 10 #include "components/autofill/core/browser/personal_data_manager.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 68 jstring jguid); | 68 jstring jguid); |
| 69 | 69 |
| 70 // Adds or modifies a credit card. If |jguid| is an empty string, we are | 70 // Adds or modifies a credit card. If |jguid| is an empty string, we are |
| 71 // creating a new profile. Else we are updating an existing profile. Always | 71 // creating a new profile. Else we are updating an existing profile. Always |
| 72 // returns the GUID for this profile; the GUID it may have just been created. | 72 // returns the GUID for this profile; the GUID it may have just been created. |
| 73 base::android::ScopedJavaLocalRef<jstring> SetCreditCard( | 73 base::android::ScopedJavaLocalRef<jstring> SetCreditCard( |
| 74 JNIEnv* env, | 74 JNIEnv* env, |
| 75 jobject unused_obj, | 75 jobject unused_obj, |
| 76 jobject jcard); | 76 jobject jcard); |
| 77 | 77 |
| 78 // Gets the labels for all known profiles. These labels are useful for | |
| 79 // distinguishing the profiles from one another. | |
| 80 base::android::ScopedJavaLocalRef<jobjectArray> GetProfileLabels( | |
|
Evan Stade
2014/08/06 00:24:39
Q: Why is this not just part of GetProfileBy*?
A:
aruslan
2014/08/06 16:06:51
Acknowledged.
| |
| 81 JNIEnv* env, | |
| 82 jobject unused_obj); | |
| 83 | |
| 78 // Removes the profile or credit card represented by |jguid|. | 84 // Removes the profile or credit card represented by |jguid|. |
| 79 void RemoveByGUID(JNIEnv* env, jobject unused_obj, jstring jguid); | 85 void RemoveByGUID(JNIEnv* env, jobject unused_obj, jstring jguid); |
| 80 | 86 |
| 81 // PersonalDataManagerObserver: | 87 // PersonalDataManagerObserver: |
| 82 virtual void OnPersonalDataChanged() OVERRIDE; | 88 virtual void OnPersonalDataChanged() OVERRIDE; |
| 83 | 89 |
| 84 // Registers the JNI bindings for this class. | 90 // Registers the JNI bindings for this class. |
| 85 static bool Register(JNIEnv* env); | 91 static bool Register(JNIEnv* env); |
| 86 | 92 |
| 87 private: | 93 private: |
| 88 virtual ~PersonalDataManagerAndroid(); | 94 virtual ~PersonalDataManagerAndroid(); |
| 89 | 95 |
| 90 // Pointer to the java counterpart. | 96 // Pointer to the java counterpart. |
| 91 JavaObjectWeakGlobalRef weak_java_obj_; | 97 JavaObjectWeakGlobalRef weak_java_obj_; |
| 92 | 98 |
| 93 // Pointer to the PersonalDataManager for the main profile. | 99 // Pointer to the PersonalDataManager for the main profile. |
| 94 PersonalDataManager* personal_data_manager_; | 100 PersonalDataManager* personal_data_manager_; |
| 95 | 101 |
| 96 DISALLOW_COPY_AND_ASSIGN(PersonalDataManagerAndroid); | 102 DISALLOW_COPY_AND_ASSIGN(PersonalDataManagerAndroid); |
| 97 }; | 103 }; |
| 98 | 104 |
| 99 } // namespace autofill | 105 } // namespace autofill |
| 100 | 106 |
| 101 #endif // CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ | 107 #endif // CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ |
| OLD | NEW |