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

Side by Side Diff: chrome/browser/android/signin/account_tracker_service_android.h

Issue 1405353002: [Android] Replace a synchronous callsite of GetAccounts() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_ANDROID_SIGNIN_ACCOUNT_TRACKER_SERVICE_ANDROID_H_ 5 #ifndef CHROME_BROWSER_ANDROID_SIGNIN_ACCOUNT_TRACKER_SERVICE_ANDROID_H_
6 #define CHROME_BROWSER_ANDROID_SIGNIN_ACCOUNT_TRACKER_SERVICE_ANDROID_H_ 6 #define CHROME_BROWSER_ANDROID_SIGNIN_ACCOUNT_TRACKER_SERVICE_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/scoped_java_ref.h" 10 namespace signin {
11 #include "chrome/browser/profiles/profile.h" 11 namespace android {
12 #include "components/signin/core/browser/account_tracker_service.h" 12 // A bridge between the Java and C++ AccountTrackerService.
13 bool RegisterAccountTrackerService(JNIEnv* env);
13 14
14 // Android wrapper of the AccountTrackerService which provides access from Java 15 } // namespace android
15 // layer. Note that on Android, there's only a single profile, and therefore a 16 } // namespace signin
16 // single instance of this wrapper. The same name of the Java class is
17 // AccountTrackerService.
18 class AccountTrackerServiceAndroid {
19 public:
20 AccountTrackerServiceAndroid(JNIEnv* env, jobject obj);
21
22 // Registers the AccountTrackerServiceAndroid's native methods through JNI.
23 static bool Register(JNIEnv* env);
24
25 void SeedAccountsInfo(JNIEnv* env,
26 jobject obj,
27 jobjectArray gaiaIds,
28 jobjectArray accountNames);
29
30 private:
31 ~AccountTrackerServiceAndroid();
32
33 base::android::ScopedJavaGlobalRef<jobject> java_account_tracker_service_;
34 };
35 17
36 #endif // CHROME_BROWSER_ANDROID_SIGNIN_ACCOUNT_TRACKER_SERVICE_ANDROID_H_ 18 #endif // CHROME_BROWSER_ANDROID_SIGNIN_ACCOUNT_TRACKER_SERVICE_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698