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

Side by Side Diff: chrome/browser/sync/profile_sync_service_android.cc

Issue 666033002: Fix disabling sync in Chrome for Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | 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/sync/profile_sync_service_android.h" 5 #include "chrome/browser/sync/profile_sync_service_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/i18n/time_formatting.h" 10 #include "base/i18n/time_formatting.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 } 169 }
170 170
171 jboolean ProfileSyncServiceAndroid::IsEncryptEverythingEnabled( 171 jboolean ProfileSyncServiceAndroid::IsEncryptEverythingEnabled(
172 JNIEnv* env, jobject) { 172 JNIEnv* env, jobject) {
173 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 173 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
174 return sync_service_->EncryptEverythingEnabled(); 174 return sync_service_->EncryptEverythingEnabled();
175 } 175 }
176 176
177 jboolean ProfileSyncServiceAndroid::IsSyncInitialized(JNIEnv* env, jobject) { 177 jboolean ProfileSyncServiceAndroid::IsSyncInitialized(JNIEnv* env, jobject) {
178 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 178 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
179 return sync_service_->SyncActive(); 179 return sync_service_->backend_initialized();
180 } 180 }
181 181
182 jboolean ProfileSyncServiceAndroid::IsFirstSetupInProgress( 182 jboolean ProfileSyncServiceAndroid::IsFirstSetupInProgress(
183 JNIEnv* env, jobject) { 183 JNIEnv* env, jobject) {
184 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 184 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
185 return sync_service_->FirstSetupInProgress(); 185 return sync_service_->FirstSetupInProgress();
186 } 186 }
187 187
188 jboolean ProfileSyncServiceAndroid::IsPassphraseRequired(JNIEnv* env, jobject) { 188 jboolean ProfileSyncServiceAndroid::IsPassphraseRequired(JNIEnv* env, jobject) {
189 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 189 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 ProfileSyncServiceAndroid* profile_sync_service_android = 488 ProfileSyncServiceAndroid* profile_sync_service_android =
489 new ProfileSyncServiceAndroid(env, obj); 489 new ProfileSyncServiceAndroid(env, obj);
490 profile_sync_service_android->Init(); 490 profile_sync_service_android->Init();
491 return reinterpret_cast<intptr_t>(profile_sync_service_android); 491 return reinterpret_cast<intptr_t>(profile_sync_service_android);
492 } 492 }
493 493
494 // static 494 // static
495 bool ProfileSyncServiceAndroid::Register(JNIEnv* env) { 495 bool ProfileSyncServiceAndroid::Register(JNIEnv* env) {
496 return RegisterNativesImpl(env); 496 return RegisterNativesImpl(env);
497 } 497 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698