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 "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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 AUTOFILL_PROFILE = 1 << 5, | 57 AUTOFILL_PROFILE = 1 << 5, |
58 HISTORY_DELETE_DIRECTIVE = 1 << 6, | 58 HISTORY_DELETE_DIRECTIVE = 1 << 6, |
59 PROXY_TABS = 1 << 7, | 59 PROXY_TABS = 1 << 7, |
60 FAVICON_IMAGE = 1 << 8, | 60 FAVICON_IMAGE = 1 << 8, |
61 FAVICON_TRACKING = 1 << 9, | 61 FAVICON_TRACKING = 1 << 9, |
62 NIGORI = 1 << 10, | 62 NIGORI = 1 << 10, |
63 DEVICE_INFO = 1 << 11, | 63 DEVICE_INFO = 1 << 11, |
64 EXPERIMENTS = 1 << 12, | 64 EXPERIMENTS = 1 << 12, |
65 SUPERVISED_USER_SETTING = 1 << 13, | 65 SUPERVISED_USER_SETTING = 1 << 13, |
66 SUPERVISED_USER_WHITELIST = 1 << 14, | 66 SUPERVISED_USER_WHITELIST = 1 << 14, |
67 AUTOFILL_WALLET = 1 << 15, | |
nyquist
2015/03/26 00:07:01
Any reason why this isn't called AUTOFILL_WALLET_D
Nicolas Zea
2015/03/26 00:09:33
I think it needs to match the notification type, w
| |
67 }; | 68 }; |
68 | 69 |
69 } // namespace | 70 } // namespace |
70 | 71 |
71 ProfileSyncServiceAndroid::ProfileSyncServiceAndroid(JNIEnv* env, jobject obj) | 72 ProfileSyncServiceAndroid::ProfileSyncServiceAndroid(JNIEnv* env, jobject obj) |
72 : profile_(NULL), | 73 : profile_(NULL), |
73 sync_service_(NULL), | 74 sync_service_(NULL), |
74 weak_java_profile_sync_service_(env, obj) { | 75 weak_java_profile_sync_service_(env, obj) { |
75 if (g_browser_process == NULL || | 76 if (g_browser_process == NULL || |
76 g_browser_process->profile_manager() == NULL) { | 77 g_browser_process->profile_manager() == NULL) { |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
454 jlong model_type_selection = 0; | 455 jlong model_type_selection = 0; |
455 if (types.Has(syncer::BOOKMARKS)) { | 456 if (types.Has(syncer::BOOKMARKS)) { |
456 model_type_selection |= BOOKMARK; | 457 model_type_selection |= BOOKMARK; |
457 } | 458 } |
458 if (types.Has(syncer::AUTOFILL)) { | 459 if (types.Has(syncer::AUTOFILL)) { |
459 model_type_selection |= AUTOFILL; | 460 model_type_selection |= AUTOFILL; |
460 } | 461 } |
461 if (types.Has(syncer::AUTOFILL_PROFILE)) { | 462 if (types.Has(syncer::AUTOFILL_PROFILE)) { |
462 model_type_selection |= AUTOFILL_PROFILE; | 463 model_type_selection |= AUTOFILL_PROFILE; |
463 } | 464 } |
465 if (types.Has(syncer::AUTOFILL_WALLET_DATA)) { | |
466 model_type_selection |= AUTOFILL_WALLET; | |
467 } | |
464 if (types.Has(syncer::PASSWORDS)) { | 468 if (types.Has(syncer::PASSWORDS)) { |
465 model_type_selection |= PASSWORD; | 469 model_type_selection |= PASSWORD; |
466 } | 470 } |
467 if (types.Has(syncer::TYPED_URLS)) { | 471 if (types.Has(syncer::TYPED_URLS)) { |
468 model_type_selection |= TYPED_URL; | 472 model_type_selection |= TYPED_URL; |
469 } | 473 } |
470 if (types.Has(syncer::SESSIONS)) { | 474 if (types.Has(syncer::SESSIONS)) { |
471 model_type_selection |= SESSION; | 475 model_type_selection |= SESSION; |
472 } | 476 } |
473 if (types.Has(syncer::HISTORY_DELETE_DIRECTIVES)) { | 477 if (types.Has(syncer::HISTORY_DELETE_DIRECTIVES)) { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
521 ProfileSyncServiceAndroid* profile_sync_service_android = | 525 ProfileSyncServiceAndroid* profile_sync_service_android = |
522 new ProfileSyncServiceAndroid(env, obj); | 526 new ProfileSyncServiceAndroid(env, obj); |
523 profile_sync_service_android->Init(); | 527 profile_sync_service_android->Init(); |
524 return reinterpret_cast<intptr_t>(profile_sync_service_android); | 528 return reinterpret_cast<intptr_t>(profile_sync_service_android); |
525 } | 529 } |
526 | 530 |
527 // static | 531 // static |
528 bool ProfileSyncServiceAndroid::Register(JNIEnv* env) { | 532 bool ProfileSyncServiceAndroid::Register(JNIEnv* env) { |
529 return RegisterNativesImpl(env); | 533 return RegisterNativesImpl(env); |
530 } | 534 } |
OLD | NEW |