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

Side by Side Diff: chrome/browser/android/signin/signin_manager_android.cc

Issue 49783006: policy: Remove SigninManager from UserCloudPolicyStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/policy/cloud/mock_user_cloud_policy_store.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "chrome/browser/android/signin/signin_manager_android.h" 5 #include "chrome/browser/android/signin/signin_manager_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 domain.obj()); 99 domain.obj());
100 #endif 100 #endif
101 } 101 }
102 102
103 void SigninManagerAndroid::FetchPolicyBeforeSignIn(JNIEnv* env, jobject obj) { 103 void SigninManagerAndroid::FetchPolicyBeforeSignIn(JNIEnv* env, jobject obj) {
104 #if defined(ENABLE_CONFIGURATION_POLICY) 104 #if defined(ENABLE_CONFIGURATION_POLICY)
105 if (cloud_policy_client_) { 105 if (cloud_policy_client_) {
106 policy::UserPolicySigninService* service = 106 policy::UserPolicySigninService* service =
107 policy::UserPolicySigninServiceFactory::GetForProfile(profile_); 107 policy::UserPolicySigninServiceFactory::GetForProfile(profile_);
108 service->FetchPolicyForSignedInUser( 108 service->FetchPolicyForSignedInUser(
109 username_,
109 cloud_policy_client_.Pass(), 110 cloud_policy_client_.Pass(),
110 base::Bind(&SigninManagerAndroid::OnPolicyFetchDone, 111 base::Bind(&SigninManagerAndroid::OnPolicyFetchDone,
111 weak_factory_.GetWeakPtr())); 112 weak_factory_.GetWeakPtr()));
112 return; 113 return;
113 } 114 }
114 #endif 115 #endif
115 // This shouldn't be called when ShouldLoadPolicyForUser() is false, or when 116 // This shouldn't be called when ShouldLoadPolicyForUser() is false, or when
116 // CheckPolicyBeforeSignIn() failed. 117 // CheckPolicyBeforeSignIn() failed.
117 NOTREACHED(); 118 NOTREACHED();
118 Java_SigninManager_onPolicyFetchedBeforeSignIn(env, 119 Java_SigninManager_onPolicyFetchedBeforeSignIn(env,
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 return !policy::BrowserPolicyConnector::IsNonEnterpriseUser(username); 221 return !policy::BrowserPolicyConnector::IsNonEnterpriseUser(username);
221 #else 222 #else
222 return false; 223 return false;
223 #endif 224 #endif
224 } 225 }
225 226
226 // static 227 // static
227 bool SigninManagerAndroid::Register(JNIEnv* env) { 228 bool SigninManagerAndroid::Register(JNIEnv* env) {
228 return RegisterNativesImpl(env); 229 return RegisterNativesImpl(env);
229 } 230 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/policy/cloud/mock_user_cloud_policy_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698