Chromium Code Reviews| Index: chrome/browser/autofill/android/auxiliary_profiles_android.h |
| diff --git a/chrome/browser/autofill/android/auxiliary_profiles_android.h b/chrome/browser/autofill/android/auxiliary_profiles_android.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..11507f8460f825dacb0d5b3c76585145c67ad388 |
| --- /dev/null |
| +++ b/chrome/browser/autofill/android/auxiliary_profiles_android.h |
| @@ -0,0 +1,55 @@ |
| +// Copyright 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_PROFILES_ANDROID_H_ |
| +#define CHROME_BROWSER_AUTOFILL_ANDROID_AUXILIARY_PROFILES_ANDROID_H_ |
| + |
| +#include <jni.h> |
| +#include <vector> |
| + |
| +#include "base/memory/scoped_ptr.h" |
| +#include "base/string16.h" |
| +#include "chrome/browser/autofill/android/auxiliary_profile_loader_android.h" |
| + |
| +class AutofillProfile; |
| + |
| +namespace autofill { |
| +class AuxiliaryProfileLoaderAndroid; |
| +} // namespace |
| + |
| +namespace autofill { |
| + |
| + // This class is used to populate an AutofillProfile vector with |
| + // a 'default' auxiliary profile. It depends on an |
| + // AuxiliaryProfileLoaderAndroid object to provide contact information |
| + // that is re-organized into an Autofill profile. |
| +class AuxiliaryProfilesAndroid { |
| + public: |
| + // Takes in an AuxiliaryProfileLoader object which provides |
| + // contact information methods. |
|
Ilya Sherman
2013/03/11 22:39:44
nit: Line wrapping seems off.
apiccion
2013/03/13 20:17:28
Done.
|
| + explicit AuxiliaryProfilesAndroid( |
| + const autofill::AuxiliaryProfileLoaderAndroid& profile_loader); |
| + ~AuxiliaryProfilesAndroid(); |
| + |
| + // Returns autofill profile constructed from profile_loader_. |
| + scoped_ptr<AutofillProfile> LoadContactsProfile(); |
| + |
| + private: |
| + // inserts contact's address data into profile. |
|
Ilya Sherman
2013/03/11 22:39:44
nit: Begin sentences with uppercase letters (appli
apiccion
2013/03/13 20:17:28
Done.
apiccion
2013/03/13 20:17:28
Done.
|
| + void LoadAddress(AutofillProfile* profile); |
| + // inserts contact's name data into profile. |
| + void LoadName(AutofillProfile* profile); |
| + // inserts contact's email address data into profile. |
| + void LoadEmailAddress(AutofillProfile* profile); |
| + // inserts contact's phone number data into profile. |
| + void LoadPhoneNumbers(AutofillProfile* profile); |
| + |
| + const AuxiliaryProfileLoaderAndroid& profile_loader_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(AuxiliaryProfilesAndroid); |
| +}; |
| + |
| +} // namespace |
| + |
| +#endif // CHROME_BROWSER_AUTOFILL_ANDROID_AUXILIARY_PROFILES_ANDROID_H_ |