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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBroadcastService.java

Issue 2755003003: Add Interstitial for user consent (Closed)
Patch Set: Teds Nits 1 Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBroadcastService.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBroadcastService.java b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBroadcastService.java
index 0943ed7d5310a794f2e05e0d482ac8e208085877..f466c08597fc07a1144c9964753996bb4b3a928b 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBroadcastService.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBroadcastService.java
@@ -79,6 +79,18 @@ public class PhysicalWebBroadcastService extends Service {
}
};
+ /**
+ * Starts the PhysicalWebBroadcastService.
+ * Static so it can be called from multiple places in Chrome and reduce code
Ted C 2017/03/21 16:05:12 This comment seems to describe all static function
iankc 2017/03/21 18:43:25 Done.
+ * redudancy.
+ */
+ public static void startBroadcastService(String url) {
+ Context context = ContextUtils.getApplicationContext();
+ Intent intent = new Intent(context, PhysicalWebBroadcastService.class);
+ intent.putExtra(DISPLAY_URL_KEY, url);
+ context.startService(intent);
+ }
+
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
String displayUrl = fetchDisplayUrl(intent);

Powered by Google App Engine
This is Rietveld 408576698