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

Side by Side Diff: chrome/browser/autofill/android/auxiliary_profile_loader_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 Nits Created 7 years, 9 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_AUTOFILL_ANDROID_AUXILIARY_PROFILE_LOADER_ANDROID_H_
6 #define CHROME_BROWSER_AUTOFILL_ANDROID_AUXILIARY_PROFILE_LOADER_ANDROID_H_
7
8 #include <vector>
9
10 #include "base/android/jni_android.h"
11 #include "base/string16.h"
12
13 namespace autofill {
14
15 bool RegisterAuxiliaryProfileLoader(JNIEnv* env);
16
17 // This class loads user's contact information from their device.
18 // The populated data corresponds to the user's 'Me' profile in their
19 // contact list.
20 class AuxiliaryProfileLoaderAndroid {
21 public:
22 AuxiliaryProfileLoaderAndroid();
23 virtual ~AuxiliaryProfileLoaderAndroid();
24
25 void Init(JNIEnv* env, const jobject& context);
Ilya Sherman 2013/03/11 22:39:44 nit: Docs.
Ilya Sherman 2013/03/11 22:39:44 nit: Please leave a blank line after this one.
apiccion 2013/03/13 20:17:28 Done.
26 // Returns address street.
27 virtual string16 GetStreet() const;
28 // Returns address post office box.
29 virtual string16 GetPostOfficeBox() const;
30 // Returns address neighborhood (e.g. Noe Valley, Nob Hill, Twin Peaks, ...).
31 virtual string16 GetNeighborhood() const;
32 // Returns address region such as state or province information
33 // (e.g. Ontario, California, Hubei).
34 virtual string16 GetRegion() const;
35 // Returns address city.
36 virtual string16 GetCity() const;
37 // Returns address postal code or zip code.
38 virtual string16 GetPostalCode() const;
39 // Returns address country.
40 virtual string16 GetCountry() const;
41
42 // Returns contact's first name.
43 virtual string16 GetFirstName() const;
44 // Returns contact's middle name.
45 virtual string16 GetMiddleName() const;
46 // Returns contact's last name.
47 virtual string16 GetLastName() const;
48 // Returns contact's suffix (e.g. Ph.D, M.D., ...).
49 virtual string16 GetSuffix() const;
50
51 // Populates string vector parameter with contact's email addresses.
52 virtual void GetEmailAddresses(std::vector<string16>* email_addresses) const;
53
54 // Populates string vector parameter with contact's phones numbers.
55 virtual void GetPhoneNumbers(std::vector<string16>* phone_numbers) const;
56
57 private:
58 JNIEnv* env_;
59 // The reference to java |PersonalAutofillPopulator| which
60 // actually extracts users contact information from the physical device
61 base::android::ScopedJavaLocalRef<jobject> populator_;
62 DISALLOW_COPY_AND_ASSIGN(AuxiliaryProfileLoaderAndroid);
63 };
64
65 } // namespace
66
67 #endif // CHROME_BROWSER_AUTOFILL_ANDROID_AUXILIARY_PROFILE_LOADER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698