Chromium Code Reviews| OLD | NEW | 
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 package org.chromium.chrome.browser.physicalweb; | |
| 6 | |
| 7 import org.chromium.base.CommandLine; | |
| 8 import org.chromium.chrome.browser.ChromeApplication; | |
| 9 import org.chromium.chrome.browser.ChromeSwitches; | |
| 10 import org.chromium.chrome.browser.ChromeVersionInfo; | |
| 11 | |
| 12 /** | |
| 13 * This class provides the basic interface to the Physical Web feature. | |
| 14 */ | |
| 15 public class PhysicalWeb { | |
| 16 public static boolean featureIsEnabled() { | |
| 17 boolean allowedChannel = | |
| 18 ChromeVersionInfo.isLocalBuild() || ChromeVersionInfo.isDevBuild (); | |
| 
 
aurimas (slooooooooow)
2015/09/10 17:09:03
It seems like you are enabling this in Chrome Dev
 
cco3
2015/09/11 17:10:46
Is that a problem even though it's behind a flag?
 
 | |
| 19 boolean switchEnabled = | |
| 20 CommandLine.getInstance().hasSwitch(ChromeSwitches.ENABLE_PHYSIC AL_WEB); | |
| 21 return allowedChannel && switchEnabled; | |
| 22 } | |
| 23 | |
| 24 public static void startPhysicalWeb(ChromeApplication application) { | |
| 25 PhysicalWebBleClient physicalWebBleClient = PhysicalWebBleClient.getInst ance(application); | |
| 26 physicalWebBleClient.subscribe(); | |
| 27 } | |
| 28 } | |
| OLD | NEW |