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

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

Issue 2680143002: Use dropdown list for admin areas in pr form. (Closed)
Patch Set: wip Created 3 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/personal_data_manager_android.h
diff --git a/chrome/browser/autofill/android/personal_data_manager_android.h b/chrome/browser/autofill/android/personal_data_manager_android.h
index 5f48ea02e66234f8397df65cb55bab583a4844c5..d9ff50cdd1a8e19357cc0cdd60313da877d49bcd 100644
--- a/chrome/browser/autofill/android/personal_data_manager_android.h
+++ b/chrome/browser/autofill/android/personal_data_manager_android.h
@@ -5,6 +5,11 @@
#ifndef CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_
#define CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_
+#include <map>
+#include <memory>
+#include <string>
+#include <vector>
+
#include "base/android/jni_weak_ref.h"
#include "base/android/scoped_java_ref.h"
#include "base/macros.h"
@@ -332,6 +337,31 @@ class PersonalDataManagerAndroid
JNIEnv* env,
const base::android::JavaParamRef<jobject>& unused_obj);
+ // Gets the sub-keys for the region with |jregion_code| code, if the
+ // |jregion_code| rules have finished loading. Otherwise, sets up a task to
+ // get the sub-keys, when the rules are loaded.
+ void StartGettingRegionSubKeys(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& unused_obj,
+ const base::android::JavaParamRef<jstring>& jregion_code,
+ const base::android::JavaParamRef<jobject>& jdelegate);
+
+ // Gets the sub-keys of the rule associated with |jregion_code|. Should only
+ // be called when the rules are loaded.
+ base::android::ScopedJavaLocalRef<jobjectArray> GetSubKeys(
+ JNIEnv* env,
+ const std::string& jregion_code);
+
+ // Callback of the sub-keys request.
+ // This is called when the sub-keys are loaded.
+ void OnGettingSubKeysRulesLoaded(const std::string& region_code,
sebsg 2017/02/10 16:00:32 As mentioned, this is probably not necessary.
+ bool success) override;
+
+ // Cancels the pending sub-key request task.
+ void CancelPendingGetSubKeys(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& unused_obj);
+
private:
~PersonalDataManagerAndroid() override;
@@ -386,6 +416,10 @@ class PersonalDataManagerAndroid
std::map<std::string, std::vector<std::unique_ptr<Delegate>>>
pending_normalization_;
+ // Map associating a region code to pending sub-keys' request.
+ std::map<std::string, std::vector<std::unique_ptr<Delegate>>>
+ pending_subkeys_request_;
+
DISALLOW_COPY_AND_ASSIGN(PersonalDataManagerAndroid);
};

Powered by Google App Engine
This is Rietveld 408576698