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

Side by Side Diff: chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/FakeServerHelper.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 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.chrome.browser.sync; 5 package org.chromium.chrome.browser.sync;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 8
9 import com.google.protobuf.nano.InvalidProtocolBufferNanoException; 9 import com.google.protobuf.nano.InvalidProtocolBufferNanoException;
10 import com.google.protobuf.nano.MessageNano; 10 import com.google.protobuf.nano.MessageNano;
(...skipping 11 matching lines...) Expand all
22 * Assists in Java interaction the native Sync FakeServer. 22 * Assists in Java interaction the native Sync FakeServer.
23 */ 23 */
24 public class FakeServerHelper { 24 public class FakeServerHelper {
25 private static final String TAG = "FakeServerHelper"; 25 private static final String TAG = "FakeServerHelper";
26 26
27 // Lazily-instantiated singleton FakeServerHelper. 27 // Lazily-instantiated singleton FakeServerHelper.
28 private static FakeServerHelper sFakeServerHelper; 28 private static FakeServerHelper sFakeServerHelper;
29 29
30 // Pointer value for the FakeServer. This pointer is not owned by native 30 // Pointer value for the FakeServer. This pointer is not owned by native
31 // code, so it must be stored here for future deletion. 31 // code, so it must be stored here for future deletion.
32 private static long sNativeFakeServer = 0L; 32 private static long sNativeFakeServer;
33 33
34 // The pointer to the native object called here. 34 // The pointer to the native object called here.
35 private final long mNativeFakeServerHelperAndroid; 35 private final long mNativeFakeServerHelperAndroid;
36 36
37 // Accesses the singleton FakeServerHelper. There is at most one instance cr eated per 37 // Accesses the singleton FakeServerHelper. There is at most one instance cr eated per
38 // application lifetime, so no deletion mechanism is provided for the native object. 38 // application lifetime, so no deletion mechanism is provided for the native object.
39 public static FakeServerHelper get() { 39 public static FakeServerHelper get() {
40 ThreadUtils.assertOnUiThread(); 40 ThreadUtils.assertOnUiThread();
41 if (sFakeServerHelper == null) { 41 if (sFakeServerHelper == null) {
42 sFakeServerHelper = new FakeServerHelper(); 42 sFakeServerHelper = new FakeServerHelper();
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 long nativeFakeServer, String bookmarkId, String title, String url, String parentId); 408 long nativeFakeServer, String bookmarkId, String title, String url, String parentId);
409 private native void nativeModifyBookmarkFolderEntity(long nativeFakeServerHe lperAndroid, 409 private native void nativeModifyBookmarkFolderEntity(long nativeFakeServerHe lperAndroid,
410 long nativeFakeServer, String bookmarkId, String title, String paren tId); 410 long nativeFakeServer, String bookmarkId, String title, String paren tId);
411 private native String nativeGetBookmarkBarFolderId( 411 private native String nativeGetBookmarkBarFolderId(
412 long nativeFakeServerHelperAndroid, long nativeFakeServer); 412 long nativeFakeServerHelperAndroid, long nativeFakeServer);
413 private native void nativeDeleteEntity( 413 private native void nativeDeleteEntity(
414 long nativeFakeServerHelperAndroid, long nativeFakeServer, String id ); 414 long nativeFakeServerHelperAndroid, long nativeFakeServer, String id );
415 private native void nativeClearServerData( 415 private native void nativeClearServerData(
416 long nativeFakeServerHelperAndroid, long nativeFakeServer); 416 long nativeFakeServerHelperAndroid, long nativeFakeServer);
417 } 417 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698