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

Unified Diff: chrome/browser/android/signin/account_tracker_service_android.h

Issue 1256283002: GAIA ID migration for Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 5 years, 3 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/android/signin/account_tracker_service_android.h
diff --git a/chrome/browser/android/signin/account_tracker_service_android.h b/chrome/browser/android/signin/account_tracker_service_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..1770b1f1eba3f23662e26349eafe02b4d36fe7e4
--- /dev/null
+++ b/chrome/browser/android/signin/account_tracker_service_android.h
@@ -0,0 +1,36 @@
+// Copyright 2015 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_ANDROID_SIGNIN_ACCOUNT_TRACKER_SERVICE_ANDROID_H_
+#define CHROME_BROWSER_ANDROID_SIGNIN_ACCOUNT_TRACKER_SERVICE_ANDROID_H_
+
+#include <jni.h>
+
+#include "base/android/scoped_java_ref.h"
+#include "chrome/browser/profiles/profile.h"
+#include "components/signin/core/browser/account_tracker_service.h"
+
+// Android wrapper of the AccountTrackerService which provides access from Java
+// layer. Note that on Android, there's only a single profile, and therefore a
+// single instance of this wrapper. The same name of the Java class is
+// AccountTrackerService.
+class AccountTrackerServiceAndroid {
+ public:
+ AccountTrackerServiceAndroid(JNIEnv* env, jobject obj);
+
+ // Registers the AccountTrackerServiceAndroid's native methods through JNI.
+ static bool Register(JNIEnv* env);
+
+ void SeedAccountsInfo(JNIEnv* env,
+ jobject obj,
+ jobjectArray gaiaIds,
+ jobjectArray accountNames);
+
+ private:
+ ~AccountTrackerServiceAndroid();
+
+ base::android::ScopedJavaGlobalRef<jobject> java_account_tracker_service_;
+};
+
+#endif // CHROME_BROWSER_ANDROID_SIGNIN_ACCOUNT_TRACKER_SERVICE_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698