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 #include "chrome/browser/sync/profile_sync_service_android.h" | 5 #include "chrome/browser/sync/profile_sync_service_android.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
179 const JavaParamRef<jobject>&) { | 179 const JavaParamRef<jobject>&) { |
180 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 180 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
181 return sync_service_->IsBackendInitialized(); | 181 return sync_service_->IsBackendInitialized(); |
182 } | 182 } |
183 | 183 |
184 void ProfileSyncServiceAndroid::SetSetupInProgress( | 184 void ProfileSyncServiceAndroid::SetSetupInProgress( |
185 JNIEnv* env, | 185 JNIEnv* env, |
186 const JavaParamRef<jobject>& obj, | 186 const JavaParamRef<jobject>& obj, |
187 jboolean in_progress) { | 187 jboolean in_progress) { |
188 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 188 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
189 sync_service_->SetSetupInProgress(in_progress); | 189 if (in_progress) |
maxbogue
2016/06/09 20:04:11
Curly braces please
tommycli
2016/06/10 00:04:15
Done.
| |
190 setup_handle_ = sync_service_->GetSetupInProgressHandle(); | |
191 else | |
192 setup_handle_.reset(); | |
190 } | 193 } |
191 | 194 |
192 jboolean ProfileSyncServiceAndroid::IsFirstSetupComplete( | 195 jboolean ProfileSyncServiceAndroid::IsFirstSetupComplete( |
193 JNIEnv* env, | 196 JNIEnv* env, |
194 const JavaParamRef<jobject>& obj) { | 197 const JavaParamRef<jobject>& obj) { |
195 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 198 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
196 return sync_service_->IsFirstSetupComplete(); | 199 return sync_service_->IsFirstSetupComplete(); |
197 } | 200 } |
198 | 201 |
199 void ProfileSyncServiceAndroid::SetFirstSetupComplete( | 202 void ProfileSyncServiceAndroid::SetFirstSetupComplete( |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
501 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { | 504 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { |
502 ProfileSyncServiceAndroid* profile_sync_service_android = | 505 ProfileSyncServiceAndroid* profile_sync_service_android = |
503 new ProfileSyncServiceAndroid(env, obj); | 506 new ProfileSyncServiceAndroid(env, obj); |
504 if (profile_sync_service_android->Init()) { | 507 if (profile_sync_service_android->Init()) { |
505 return reinterpret_cast<intptr_t>(profile_sync_service_android); | 508 return reinterpret_cast<intptr_t>(profile_sync_service_android); |
506 } else { | 509 } else { |
507 delete profile_sync_service_android; | 510 delete profile_sync_service_android; |
508 return 0; | 511 return 0; |
509 } | 512 } |
510 } | 513 } |
OLD | NEW |