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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebEnvironment.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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.physicalweb; 5 package org.chromium.chrome.browser.physicalweb;
6 6
7 import org.chromium.chrome.browser.ChromeApplication; 7 import org.chromium.chrome.browser.ChromeApplication;
8 8
9 /** 9 /**
10 * Tool that reports information about conflicting clients. 10 * Tool that reports information about conflicting clients.
11 */ 11 */
12 public class PhysicalWebEnvironment { 12 public class PhysicalWebEnvironment {
13 private static final Object INSTANCE_LOCK = new Object(); 13 private static final Object INSTANCE_LOCK = new Object();
14 private static PhysicalWebEnvironment sInstance = null; 14 private static PhysicalWebEnvironment sInstance;
15 15
16 /** 16 /**
17 * Get a singleton instance of this class. 17 * Get a singleton instance of this class.
18 * @param chromeApplication An instance of {@link ChromeApplication}, used t o get the 18 * @param chromeApplication An instance of {@link ChromeApplication}, used t o get the
19 * appropriate PhysicalWebEnvironment implementation. 19 * appropriate PhysicalWebEnvironment implementation.
20 * @return an instance of this class (or subclass) as decided by the applica tion parameter 20 * @return an instance of this class (or subclass) as decided by the applica tion parameter
21 */ 21 */
22 public static PhysicalWebEnvironment getInstance(ChromeApplication chromeApp lication) { 22 public static PhysicalWebEnvironment getInstance(ChromeApplication chromeApp lication) {
23 synchronized (INSTANCE_LOCK) { 23 synchronized (INSTANCE_LOCK) {
24 if (sInstance == null) { 24 if (sInstance == null) {
25 sInstance = chromeApplication.createPhysicalWebEnvironment(); 25 sInstance = chromeApplication.createPhysicalWebEnvironment();
26 } 26 }
27 } 27 }
28 return sInstance; 28 return sInstance;
29 } 29 }
30 30
31 /** 31 /**
32 * Reports whether the environment has another notification-based Physical W eb client enabled. 32 * Reports whether the environment has another notification-based Physical W eb client enabled.
33 * @return true if there is another notification-based Physical Web client e nabled. 33 * @return true if there is another notification-based Physical Web client e nabled.
34 */ 34 */
35 public boolean hasNotificationBasedClient() { 35 public boolean hasNotificationBasedClient() {
36 return false; 36 return false;
37 } 37 }
38 } 38 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698