| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SIGNIN_MANAGER_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_SIGNIN_SIGNIN_MANAGER_ANDROID_H_ |
| 6 #define CHROME_BROWSER_ANDROID_SIGNIN_SIGNIN_MANAGER_ANDROID_H_ | 6 #define CHROME_BROWSER_ANDROID_SIGNIN_SIGNIN_MANAGER_ANDROID_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/android/scoped_java_ref.h" | 13 #include "base/android/scoped_java_ref.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "base/threading/thread_checker.h" | 16 #include "base/threading/thread_checker.h" |
| 17 #include "components/prefs/pref_change_registrar.h" | 17 #include "components/prefs/pref_change_registrar.h" |
| 18 #include "components/signin/core/browser/signin_manager_base.h" | 18 #include "components/signin/core/browser/signin_manager_base.h" |
| 19 | 19 |
| 20 class Profile; | 20 class Profile; |
| 21 | 21 |
| 22 namespace policy { | |
| 23 class CloudPolicyClient; | |
| 24 } | |
| 25 | |
| 26 // Android wrapper of the SigninManager which provides access from the Java | 22 // Android wrapper of the SigninManager which provides access from the Java |
| 27 // layer. Note that on Android, there's only a single profile, and therefore | 23 // layer. Note that on Android, there's only a single profile, and therefore |
| 28 // a single instance of this wrapper. The name of the Java class is | 24 // a single instance of this wrapper. The name of the Java class is |
| 29 // SigninManager. | 25 // SigninManager. |
| 30 // This class should only be accessed from the UI thread. | 26 // This class should only be accessed from the UI thread. |
| 31 // | 27 // |
| 32 // This class implements parts of the sign-in flow, to make sure that policy | 28 // This class implements parts of the sign-in flow, to make sure that policy |
| 33 // is available before sign-in completes. | 29 // is available before sign-in completes. |
| 34 class SigninManagerAndroid : public SigninManagerBase::Observer { | 30 class SigninManagerAndroid : public SigninManagerBase::Observer { |
| 35 public: | 31 public: |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 PrefChangeRegistrar pref_change_registrar_; | 113 PrefChangeRegistrar pref_change_registrar_; |
| 118 | 114 |
| 119 base::ThreadChecker thread_checker_; | 115 base::ThreadChecker thread_checker_; |
| 120 | 116 |
| 121 base::WeakPtrFactory<SigninManagerAndroid> weak_factory_; | 117 base::WeakPtrFactory<SigninManagerAndroid> weak_factory_; |
| 122 | 118 |
| 123 DISALLOW_COPY_AND_ASSIGN(SigninManagerAndroid); | 119 DISALLOW_COPY_AND_ASSIGN(SigninManagerAndroid); |
| 124 }; | 120 }; |
| 125 | 121 |
| 126 #endif // CHROME_BROWSER_ANDROID_SIGNIN_SIGNIN_MANAGER_ANDROID_H_ | 122 #endif // CHROME_BROWSER_ANDROID_SIGNIN_SIGNIN_MANAGER_ANDROID_H_ |
| OLD | NEW |