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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWeb.java

Issue 1326593006: Add the Physical Web to Chrome on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add an OWNERS file Created 5 years, 3 months 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
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698