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

Unified Diff: chrome/test/android/javatests/src/org/chromium/chrome/test/webapk/TestWebApkServiceImplWrapper.java

Issue 2133923002: Simplify caller checking logic in WebApkServiceImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into sandbox_on_transact1 Created 4 years, 5 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
« no previous file with comments | « chrome/test/android/BUILD.gn ('k') | testing/buildbot/chromium.linux.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/android/javatests/src/org/chromium/chrome/test/webapk/TestWebApkServiceImplWrapper.java
diff --git a/chrome/test/android/javatests/src/org/chromium/chrome/test/webapk/TestWebApkServiceImplWrapper.java b/chrome/test/android/javatests/src/org/chromium/chrome/test/webapk/TestWebApkServiceImplWrapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..71ae8d2f25ae20683778f070176d0dcdc39506b6
--- /dev/null
+++ b/chrome/test/android/javatests/src/org/chromium/chrome/test/webapk/TestWebApkServiceImplWrapper.java
@@ -0,0 +1,28 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.test.webapk;
+
+import android.app.Service;
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.IBinder;
+
+import org.chromium.webapk.lib.runtime_library.WebApkServiceImpl;
+
+/**
+ * Simple service which uses {@link WebApkServiceImpl} for testing.
+ */
+public class TestWebApkServiceImplWrapper extends Service {
+ @Override
+ public IBinder onBind(Intent intent) {
+ int smallIconId = intent.getIntExtra(WebApkServiceImpl.KEY_SMALL_ICON_ID, -1);
+ int authorizedAppUid = intent.getIntExtra(WebApkServiceImpl.KEY_HOST_BROWSER_UID, -1);
+
+ Bundle bundle = new Bundle();
+ bundle.putInt(WebApkServiceImpl.KEY_SMALL_ICON_ID, smallIconId);
+ bundle.putInt(WebApkServiceImpl.KEY_HOST_BROWSER_UID, authorizedAppUid);
+ return (IBinder) new WebApkServiceImpl(this, bundle);
+ }
+}
« no previous file with comments | « chrome/test/android/BUILD.gn ('k') | testing/buildbot/chromium.linux.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698