| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.chrome.browser.services.gcm; | 5 package org.chromium.chrome.browser.services.gcm; |
| 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.os.AsyncTask; | 9 import android.os.AsyncTask; |
| 10 import android.os.Bundle; | 10 import android.os.Bundle; |
| 11 import android.os.Parcel; | 11 import android.os.Parcel; |
| 12 import android.util.Log; | 12 import android.util.Log; |
| 13 | 13 |
| 14 import com.google.android.gms.gcm.GoogleCloudMessaging; | 14 import com.google.android.gms.gcm.GoogleCloudMessaging; |
| 15 import com.google.ipc.invalidation.ticl.android2.channel.GcmUpstreamSenderServic
e; | 15 import com.google.ipc.invalidation.ticl.android2.channel.GcmUpstreamSenderServic
e; |
| 16 | 16 |
| 17 import org.chromium.chrome.browser.signin.OAuth2TokenService; | 17 import org.chromium.chrome.browser.signin.OAuth2TokenService; |
| 18 import org.chromium.sync.SyncConstants; | 18 import org.chromium.components.sync.SyncConstants; |
| 19 import org.chromium.sync.signin.AccountManagerHelper; | 19 import org.chromium.components.sync.signin.AccountManagerHelper; |
| 20 import org.chromium.sync.signin.ChromeSigninController; | 20 import org.chromium.components.sync.signin.ChromeSigninController; |
| 21 | 21 |
| 22 import java.io.IOException; | 22 import java.io.IOException; |
| 23 import java.util.UUID; | 23 import java.util.UUID; |
| 24 | 24 |
| 25 import javax.annotation.Nullable; | 25 import javax.annotation.Nullable; |
| 26 | 26 |
| 27 /** | 27 /** |
| 28 * Sends Upstream messages for Invalidations using GCM. | 28 * Sends Upstream messages for Invalidations using GCM. |
| 29 */ | 29 */ |
| 30 public class InvalidationGcmUpstreamSender extends GcmUpstreamSenderService { | 30 public class InvalidationGcmUpstreamSender extends GcmUpstreamSenderService { |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 */ | 105 */ |
| 106 private Bundle createDeepCopy(Bundle original) { | 106 private Bundle createDeepCopy(Bundle original) { |
| 107 Parcel temp = Parcel.obtain(); | 107 Parcel temp = Parcel.obtain(); |
| 108 original.writeToParcel(temp, 0); | 108 original.writeToParcel(temp, 0); |
| 109 temp.setDataPosition(0); | 109 temp.setDataPosition(0); |
| 110 Bundle copy = temp.readBundle(); | 110 Bundle copy = temp.readBundle(); |
| 111 temp.recycle(); | 111 temp.recycle(); |
| 112 return copy; | 112 return copy; |
| 113 } | 113 } |
| 114 } | 114 } |
| OLD | NEW |