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: components/invalidation/impl/android/javatests/src/org/chromium/components/invalidation/TestableInvalidationClientService.java

Issue 2548013002: Remove redundant field initialization in Java code. (Closed)
Patch Set: rebase Created 4 years 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
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 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.ComponentName; 8 import android.content.ComponentName;
9 import android.content.Intent; 9 import android.content.Intent;
10 import android.os.Bundle; 10 import android.os.Bundle;
(...skipping 28 matching lines...) Expand all
39 39
40 /** Intents given to {@link #startService}. */ 40 /** Intents given to {@link #startService}. */
41 final List<Intent> mStartedServices = new ArrayList<Intent>(); 41 final List<Intent> mStartedServices = new ArrayList<Intent>();
42 42
43 /** Bundles given to {@link #requestSyncFromContentResolver}. */ 43 /** Bundles given to {@link #requestSyncFromContentResolver}. */
44 final List<Bundle> mRequestedSyncs = new ArrayList<Bundle>(); 44 final List<Bundle> mRequestedSyncs = new ArrayList<Bundle>();
45 45
46 final List<byte[]> mAcknowledgements = new ArrayList<byte[]>(); 46 final List<byte[]> mAcknowledgements = new ArrayList<byte[]>();
47 47
48 /** Whether Chrome is in the foreground. */ 48 /** Whether Chrome is in the foreground. */
49 private boolean mIsChromeInForeground = false; 49 private boolean mIsChromeInForeground;
50 50
51 /** Whether sync is enabled. */ 51 /** Whether sync is enabled. */
52 private boolean mIsSyncEnabled = false; 52 private boolean mIsSyncEnabled;
53 53
54 @Override 54 @Override
55 public void acknowledge(byte[] ackHandle) { 55 public void acknowledge(byte[] ackHandle) {
56 mAcknowledgements.add(ackHandle); 56 mAcknowledgements.add(ackHandle);
57 } 57 }
58 58
59 @Override 59 @Override
60 public void register(byte[] clientId, Iterable<ObjectId> objectIds) { 60 public void register(byte[] clientId, Iterable<ObjectId> objectIds) {
61 List<ObjectId> objectIdList = CollectionUtil.newArrayList(objectIds); 61 List<ObjectId> objectIdList = CollectionUtil.newArrayList(objectIds);
62 mRegistrations.add(objectIdList); 62 mRegistrations.add(objectIdList);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 /** 98 /**
99 * Sets the variables used to control whether or not a notification client s hould be running. 99 * Sets the variables used to control whether or not a notification client s hould be running.
100 * @param isChromeInForeground whether Chrome is in the foreground 100 * @param isChromeInForeground whether Chrome is in the foreground
101 * @param isSyncEnabled whether sync is enabled 101 * @param isSyncEnabled whether sync is enabled
102 */ 102 */
103 void setShouldRunStates(boolean isChromeInForeground, boolean isSyncEnabled) { 103 void setShouldRunStates(boolean isChromeInForeground, boolean isSyncEnabled) {
104 this.mIsChromeInForeground = isChromeInForeground; 104 this.mIsChromeInForeground = isChromeInForeground;
105 this.mIsSyncEnabled = isSyncEnabled; 105 this.mIsSyncEnabled = isSyncEnabled;
106 } 106 }
107 } 107 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698