| Index: chrome/android/java_staging/src/org/chromium/chrome/browser/gcore/ChromeGoogleApiClientImpl.java
|
| diff --git a/chrome/android/java_staging/src/org/chromium/chrome/browser/gcore/ChromeGoogleApiClientImpl.java b/chrome/android/java_staging/src/org/chromium/chrome/browser/gcore/ChromeGoogleApiClientImpl.java
|
| deleted file mode 100644
|
| index 1f63c2e06d2a5bea570e43894f8679c06efd2022..0000000000000000000000000000000000000000
|
| --- a/chrome/android/java_staging/src/org/chromium/chrome/browser/gcore/ChromeGoogleApiClientImpl.java
|
| +++ /dev/null
|
| @@ -1,76 +0,0 @@
|
| -// Copyright 2015 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.browser.gcore;
|
| -
|
| -import android.content.Context;
|
| -
|
| -import com.google.android.gms.common.ConnectionResult;
|
| -import com.google.android.gms.common.GooglePlayServicesUtil;
|
| -import com.google.android.gms.common.api.GoogleApiClient;
|
| -
|
| -import org.chromium.base.Log;
|
| -import org.chromium.base.TraceEvent;
|
| -
|
| -import java.util.concurrent.TimeUnit;
|
| -
|
| -/**
|
| - * Default implementation for {@link ChromeGoogleApiClient}.
|
| - */
|
| -public class ChromeGoogleApiClientImpl implements ChromeGoogleApiClient {
|
| - private static final String TAG = "cr.Icing";
|
| -
|
| - private final Context mApplicationContext;
|
| - private final GoogleApiClient mClient;
|
| -
|
| - /**
|
| - * @param context its application context will be exposed through
|
| - * {@link #getApplicationContext()}.
|
| - * @param client will be exposed through {@link #getApiClient()}.
|
| - */
|
| - public ChromeGoogleApiClientImpl(Context context, GoogleApiClient client) {
|
| - mApplicationContext = context.getApplicationContext();
|
| - mClient = client;
|
| - }
|
| -
|
| - @Override
|
| - public void disconnect() {
|
| - mClient.disconnect();
|
| - }
|
| -
|
| - @Override
|
| - public boolean isGooglePlayServicesAvailable() {
|
| - TraceEvent.begin("ChromeGoogleApiClientImpl:isGooglePlayServicesAvailable");
|
| - try {
|
| - int result = GooglePlayServicesUtil.isGooglePlayServicesAvailable(mApplicationContext);
|
| - return result == ConnectionResult.SUCCESS;
|
| - } finally {
|
| - TraceEvent.end("ChromeGoogleApiClientImpl:isGooglePlayServicesAvailable");
|
| - }
|
| - }
|
| -
|
| - @Override
|
| - public boolean connectWithTimeout(long timeout) {
|
| - TraceEvent.begin("ChromeGoogleApiClientImpl:connectWithTimeout");
|
| - try {
|
| - ConnectionResult result = mClient.blockingConnect(timeout, TimeUnit.MILLISECONDS);
|
| - if (!result.isSuccess()) {
|
| - Log.e(TAG, "Connection to GmsCore unsuccessful. Error %d", result.getErrorCode());
|
| - } else {
|
| - Log.d(TAG, "Connection to GmsCore successful.");
|
| - }
|
| - return result.isSuccess();
|
| - } finally {
|
| - TraceEvent.end("ChromeGoogleApiClientImpl:connectWithTimeout");
|
| - }
|
| - }
|
| -
|
| - public Context getApplicationContext() {
|
| - return mApplicationContext;
|
| - }
|
| -
|
| - public GoogleApiClient getApiClient() {
|
| - return mClient;
|
| - }
|
| -}
|
|
|