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

Unified Diff: chrome/browser/autofill/auxiliary_profiles_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: Autofill 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/auxiliary_profiles_android.h
diff --git a/chrome/browser/autofill/auxiliary_profiles_android.h b/chrome/browser/autofill/auxiliary_profiles_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..ba1d98e4882387a96c5d773c24c4f629052b2f3b
--- /dev/null
+++ b/chrome/browser/autofill/auxiliary_profiles_android.h
@@ -0,0 +1,39 @@
+// 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_AUXILIARY_PROFILES_ANDROID_H_
+#define CHROME_BROWSER_AUTOFILL_AUXILIARY_PROFILES_ANDROID_H_
+
+#include <jni.h>
Ilya Sherman 2013/03/01 01:55:04 nit: Please leave a blank line after this one.
apiccion 2013/03/02 03:37:01 Done.
+#include "base/guid.h"
Ilya Sherman 2013/03/01 01:55:04 nit: This doesn't seem to be used.
apiccion 2013/03/02 03:37:01 Done.
+#include "base/logging.h"
Ilya Sherman 2013/03/01 01:55:04 nit: This doesn't seem to be used.
apiccion 2013/03/02 03:37:01 Done.
+#include "base/memory/scoped_ptr.h"
Ilya Sherman 2013/03/01 01:55:04 nit: This doesn't seem to be used.
apiccion 2013/03/02 03:37:01 Done.
+#include "base/memory/scoped_vector.h"
+#include "base/string16.h"
+#include "base/utf_string_conversions.h"
Ilya Sherman 2013/03/01 01:55:04 nit: This doesn't seem to be used.
apiccion 2013/03/02 03:37:01 Done.
+#include "chrome/browser/autofill/autofill_profile.h"
Ilya Sherman 2013/03/01 01:55:04 nit: Forward-declare.
apiccion 2013/03/02 03:37:01 Done.
+#include "chrome/browser/autofill/auxiliary_profile_loader.h"
Ilya Sherman 2013/03/01 01:55:04 nit: Forward-declare.
apiccion 2013/03/02 03:37:01 Done.
+
+class AuxiliaryProfilesAndroid {
Ilya Sherman 2013/03/01 01:55:04 nit: Docs.
apiccion 2013/03/02 03:37:01 Done.
apiccion 2013/03/02 03:37:01 Done.
+ public:
+ AuxiliaryProfilesAndroid(ScopedVector<AutofillProfile>* profiles,
Ilya Sherman 2013/03/01 01:55:04 You should never pass in a ScopedVector to a metho
Ilya Sherman 2013/03/01 01:55:04 nit: Docs.
apiccion 2013/03/02 03:37:01 Done.
+ AuxiliaryProfileLoader* profileLoader);
+
+ void GetContactsProfile();
Ilya Sherman 2013/03/01 01:55:04 nit: Docs.
apiccion 2013/03/02 03:37:01 Done.
+
+ private:
+ string16 CollapseAddress(string16 pobox,
+ string16 neighborhood);
Ilya Sherman 2013/03/01 01:55:04 nit: Pass strings by const-reference, not by value
Ilya Sherman 2013/03/01 01:55:04 nit: Docs. (Applies throughout.)
apiccion 2013/03/02 03:37:01 Done.
+ void LoadAddress(AutofillProfile* profile);
Ilya Sherman 2013/03/01 01:55:04 nit: Pass by const-reference?
apiccion 2013/03/02 03:37:01 These methods mutate their argument.
+ void LoadName(AutofillProfile* profile);
+ void LoadEmailAddress(AutofillProfile* profile);
+ void LoadPhoneNumbers(AutofillProfile* profile);
+
+ ScopedVector<AutofillProfile>& profiles_;
+ AuxiliaryProfileLoader& profile_loader_;
Ilya Sherman 2013/03/01 01:55:04 You should pretty much never store non-const refer
apiccion 2013/03/02 03:37:01 Done.
+
+ DISALLOW_COPY_AND_ASSIGN(AuxiliaryProfilesAndroid);
+};
+
+#endif // CHROME_BROWSER_AUTOFILL_AUXILIARY_PROFILES_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698