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

Unified Diff: chrome/browser/autofill/android/auxiliary_profile_loader_impl_android.h

Issue 12282004: Added personal_data_manager android implementation for auto-populating auto-fill on android builds … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed assortment of nits Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autofill/android/auxiliary_profile_loader_impl_android.h
diff --git a/chrome/browser/autofill/android/auxiliary_profile_loader_impl_android.h b/chrome/browser/autofill/android/auxiliary_profile_loader_impl_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..805b42b82adecf2490741b3f9d314ef42bfc7446
--- /dev/null
+++ b/chrome/browser/autofill/android/auxiliary_profile_loader_impl_android.h
@@ -0,0 +1,48 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_AUTOFILL_ANDROID_AUXILIARY_PROFILE_LOADER_IMPL_ANDROID_H_
+#define CHROME_BROWSER_AUTOFILL_ANDROID_AUXILIARY_PROFILE_LOADER_IMPL_ANDROID_H_
+
+#include "base/android/jni_android.h"
+#include "chrome/browser/autofill/android/auxiliary_profile_loader_android.h"
+
+bool RegisterAuxiliaryProfileLoader(JNIEnv* env);
Ilya Sherman 2013/03/05 00:42:38 nit: This should be defined within the "autofill"
apiccion 2013/03/09 00:53:41 Done.
apiccion 2013/03/09 00:53:41 Done.
apiccion 2013/03/09 00:53:41 Done.
+
+namespace autofill {
+
+class AuxiliaryProfileLoaderImplAndroid : public AuxiliaryProfileLoader {
+ // This is a concrete android implementation for |AuxiliaryProfileLoader|
+ // It grabs user contact information via JNI bridge from
+ // |PersonalAutofillPopulator|.
Ilya Sherman 2013/03/05 00:42:38 nit: Comments go above the class.
apiccion 2013/03/09 00:53:41 Done.
+ public:
+ explicit AuxiliaryProfileLoaderImplAndroid();
Ilya Sherman 2013/03/05 00:42:38 nit: No need for explicit. 'explicit' is only nee
apiccion 2013/03/09 00:53:41 Done.
+ ~AuxiliaryProfileLoaderImplAndroid();
+
+ // AuxiliaryProfileLoader implementation
+ virtual string16 GetStreet() const OVERRIDE;
+ virtual string16 GetPostOfficeBox() const OVERRIDE;
+ virtual string16 GetNeighborhood() const OVERRIDE;
+ virtual string16 GetRegion() const OVERRIDE;
+ virtual string16 GetCity() const OVERRIDE;
+ virtual string16 GetPostalCode() const OVERRIDE;
+ virtual string16 GetCountry() const OVERRIDE;
+ virtual string16 GetFirstName() const OVERRIDE;
+ virtual string16 GetMiddleName() const OVERRIDE;
+ virtual string16 GetLastName() const OVERRIDE;
+ virtual string16 GetSuffix() const OVERRIDE;
+ virtual void GetEmailAddresses(std::vector<string16>*) const OVERRIDE;
+ virtual void GetPhoneNumbers(std::vector<string16>*) const OVERRIDE;
+
+ private:
+ JNIEnv* env_;
+ // The reference to java |PersonalAutofillPopulator| which
+ // actually extracts users contact information from the physical device
+ base::android::ScopedJavaLocalRef<jobject> populator_;
+ DISALLOW_COPY_AND_ASSIGN(AuxiliaryProfileLoaderImplAndroid);
+};
+
+} // namespace
+
+#endif // CHROME_BROWSER_AUTOFILL_ANDROID_AUXILIARY_PROFILE_LOADER_IMPL_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698