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

Unified Diff: services/shape_detection/android/java/src/org/chromium/shape_detection/BarcodeDetectionImpl.java

Issue 2855203003: Shape Detection: move {BarcodeDetectionImpl,TextDetectionImpl}.java to //services/shape_detection (Closed)
Patch Set: Make |java_interface_provider_| a std::unique_ptr<> Created 3 years, 7 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: services/shape_detection/android/java/src/org/chromium/shape_detection/BarcodeDetectionImpl.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/shapedetection/BarcodeDetectionImpl.java b/services/shape_detection/android/java/src/org/chromium/shape_detection/BarcodeDetectionImpl.java
similarity index 93%
rename from chrome/android/java/src/org/chromium/chrome/browser/shapedetection/BarcodeDetectionImpl.java
rename to services/shape_detection/android/java/src/org/chromium/shape_detection/BarcodeDetectionImpl.java
index 6d46e5fa3985d7948e29ab92ed28f90c75b43914..3a3df181d68f285345abf96edd16e3d0c56bfc28 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/shapedetection/BarcodeDetectionImpl.java
+++ b/services/shape_detection/android/java/src/org/chromium/shape_detection/BarcodeDetectionImpl.java
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-package org.chromium.chrome.browser.shapedetection;
+package org.chromium.shape_detection;
import android.content.Context;
import android.graphics.Bitmap;
@@ -10,13 +10,13 @@ import android.graphics.Point;
import android.graphics.Rect;
import android.util.SparseArray;
+import com.google.android.gms.common.ConnectionResult;
+import com.google.android.gms.common.GoogleApiAvailability;
import com.google.android.gms.vision.Frame;
import com.google.android.gms.vision.barcode.Barcode;
import com.google.android.gms.vision.barcode.BarcodeDetector;
import org.chromium.base.Log;
-import org.chromium.chrome.browser.externalauth.ExternalAuthUtils;
-import org.chromium.chrome.browser.externalauth.UserRecoverableErrorHandler;
import org.chromium.gfx.mojom.PointF;
import org.chromium.gfx.mojom.RectF;
import org.chromium.mojo.system.MojoException;
@@ -45,8 +45,8 @@ public class BarcodeDetectionImpl implements BarcodeDetection {
@Override
public void detect(
SharedBufferHandle frameData, int width, int height, DetectResponse callback) {
- if (!ExternalAuthUtils.getInstance().canUseGooglePlayServices(
- mContext, new UserRecoverableErrorHandler.Silent())) {
+ if (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(mContext)
+ != ConnectionResult.SUCCESS) {
Log.e(TAG, "Google Play Services not available");
callback.call(new BarcodeDetectionResult[0]);
return;

Powered by Google App Engine
This is Rietveld 408576698