Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/BackgroundSyncNetworkObserver.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 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.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.Manifest; 7 import android.Manifest;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.pm.PackageManager; 9 import android.content.pm.PackageManager;
10 import android.os.Process; 10 import android.os.Process;
(...skipping 23 matching lines...) Expand all
34 * This class lives on the main thread. 34 * This class lives on the main thread.
35 */ 35 */
36 @JNINamespace("content") 36 @JNINamespace("content")
37 class BackgroundSyncNetworkObserver implements NetworkChangeNotifierAutoDetect.O bserver { 37 class BackgroundSyncNetworkObserver implements NetworkChangeNotifierAutoDetect.O bserver {
38 private static final String TAG = "cr_BgSyncNetObserver"; 38 private static final String TAG = "cr_BgSyncNetObserver";
39 39
40 private NetworkChangeNotifierAutoDetect mNotifier; 40 private NetworkChangeNotifierAutoDetect mNotifier;
41 private Context mContext; 41 private Context mContext;
42 42
43 // The singleton instance. 43 // The singleton instance.
44 private static BackgroundSyncNetworkObserver sInstance = null; 44 private static BackgroundSyncNetworkObserver sInstance;
45 45
46 // List of native observers. These are each called when the network state ch anges. 46 // List of native observers. These are each called when the network state ch anges.
47 private List<Long> mNativePtrs; 47 private List<Long> mNativePtrs;
48 48
49 private BackgroundSyncNetworkObserver(Context ctx) { 49 private BackgroundSyncNetworkObserver(Context ctx) {
50 ThreadUtils.assertOnUiThread(); 50 ThreadUtils.assertOnUiThread();
51 mContext = ctx; 51 mContext = ctx;
52 mNativePtrs = new ArrayList<Long>(); 52 mNativePtrs = new ArrayList<Long>();
53 } 53 }
54 54
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 @Override 115 @Override
116 public void onNetworkSoonToDisconnect(long netId) {} 116 public void onNetworkSoonToDisconnect(long netId) {}
117 @Override 117 @Override
118 public void onNetworkDisconnect(long netId) {} 118 public void onNetworkDisconnect(long netId) {}
119 @Override 119 @Override
120 public void purgeActiveNetworkList(long[] activeNetIds) {} 120 public void purgeActiveNetworkList(long[] activeNetIds) {}
121 121
122 @NativeClassQualifiedName("BackgroundSyncNetworkObserverAndroid::Observer") 122 @NativeClassQualifiedName("BackgroundSyncNetworkObserverAndroid::Observer")
123 private native void nativeNotifyConnectionTypeChanged(long nativePtr, int ne wConnectionType); 123 private native void nativeNotifyConnectionTypeChanged(long nativePtr, int ne wConnectionType);
124 } 124 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698