OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 package org.chromium.components.invalidation; | 5 package org.chromium.components.invalidation; |
6 | 6 |
7 import android.accounts.Account; | 7 import android.accounts.Account; |
8 import android.content.Context; | 8 import android.content.Context; |
9 import android.content.Intent; | 9 import android.content.Intent; |
10 | 10 |
11 import com.google.protos.ipc.invalidation.Types; | 11 import com.google.protos.ipc.invalidation.Types; |
12 | 12 |
13 import org.chromium.base.ThreadUtils; | 13 import org.chromium.base.ThreadUtils; |
14 import org.chromium.base.VisibleForTesting; | 14 import org.chromium.base.VisibleForTesting; |
15 import org.chromium.base.annotations.CalledByNative; | 15 import org.chromium.base.annotations.CalledByNative; |
16 import org.chromium.base.annotations.JNINamespace; | 16 import org.chromium.base.annotations.JNINamespace; |
17 import org.chromium.sync.notifier.InvalidationClientNameProvider; | 17 import org.chromium.components.sync.notifier.InvalidationClientNameProvider; |
18 import org.chromium.sync.notifier.InvalidationIntentProtocol; | 18 import org.chromium.components.sync.notifier.InvalidationIntentProtocol; |
19 import org.chromium.sync.notifier.InvalidationPreferences; | 19 import org.chromium.components.sync.notifier.InvalidationPreferences; |
20 | 20 |
21 /** | 21 /** |
22 * Wrapper for invalidations::InvalidationServiceAndroid. | 22 * Wrapper for invalidations::InvalidationServiceAndroid. |
23 * | 23 * |
24 * Serves as the bridge between Java and C++ for the invalidations component. | 24 * Serves as the bridge between Java and C++ for the invalidations component. |
25 */ | 25 */ |
26 @JNINamespace("invalidation") | 26 @JNINamespace("invalidation") |
27 public class InvalidationService { | 27 public class InvalidationService { |
28 private final Context mContext; | 28 private final Context mContext; |
29 | 29 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 * ID. In Java, we call it the client name. | 81 * ID. In Java, we call it the client name. |
82 */ | 82 */ |
83 @CalledByNative | 83 @CalledByNative |
84 private byte[] getInvalidatorClientId() { | 84 private byte[] getInvalidatorClientId() { |
85 return InvalidationClientNameProvider.get().getInvalidatorClientName(); | 85 return InvalidationClientNameProvider.get().getInvalidatorClientName(); |
86 } | 86 } |
87 | 87 |
88 private native void nativeInvalidate(long nativeInvalidationServiceAndroid,
int objectSource, | 88 private native void nativeInvalidate(long nativeInvalidationServiceAndroid,
int objectSource, |
89 String objectId, long version, String payload); | 89 String objectId, long version, String payload); |
90 } | 90 } |
OLD | NEW |