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

Unified Diff: components/devtools_bridge/android/java/src/org/chromium/components/devtools_bridge/apiary/ApiaryClientFactory.java

Issue 1142463003: Remove devtools_bridge component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: components/devtools_bridge/android/java/src/org/chromium/components/devtools_bridge/apiary/ApiaryClientFactory.java
diff --git a/components/devtools_bridge/android/java/src/org/chromium/components/devtools_bridge/apiary/ApiaryClientFactory.java b/components/devtools_bridge/android/java/src/org/chromium/components/devtools_bridge/apiary/ApiaryClientFactory.java
deleted file mode 100644
index 92df28a5e597ae1f7f79abcdf38e3f33acc0bb17..0000000000000000000000000000000000000000
--- a/components/devtools_bridge/android/java/src/org/chromium/components/devtools_bridge/apiary/ApiaryClientFactory.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2014 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.components.devtools_bridge.apiary;
-
-import android.net.http.AndroidHttpClient;
-
-import org.chromium.base.JNINamespace;
-
-/**
- * Factory for creating clients for external APIs.
- */
-@JNINamespace("devtools_bridge::android")
-public class ApiaryClientFactory {
- private static final String USER_AGENT = "DevTools bridge";
-
- public static final String OAUTH_SCOPE = "https://www.googleapis.com/auth/clouddevices";
-
- protected final AndroidHttpClient mHttpClient = AndroidHttpClient.newInstance(USER_AGENT);
-
- /**
- * Creates a new GCD client with auth token.
- */
- public GCDClient newGCDClient(String oAuthToken) {
- return new GCDClient(mHttpClient, getAPIKey(), oAuthToken);
- }
-
- /**
- * Creates a new anonymous client. GCD requires client been not authenticated by user or
- * device credentials for finalizing registration.
- */
- public GCDClient newAnonymousGCDClient() {
- return new GCDClient(mHttpClient, nativeGetAPIKey());
- }
-
- public OAuthClient newOAuthClient() {
- return new OAuthClient(
- mHttpClient, OAUTH_SCOPE, getOAuthClientId(), nativeGetOAuthClientSecret());
- }
-
- public BlockingGCMRegistrar newGCMRegistrar() {
- return new BlockingGCMRegistrar();
- }
-
- public void close() {
- mHttpClient.close();
- }
-
- public String getOAuthClientId() {
- return nativeGetOAuthClientId();
- }
-
- protected String getAPIKey() {
- return nativeGetAPIKey();
- }
-
- private native String nativeGetAPIKey();
- private native String nativeGetOAuthClientId();
- private native String nativeGetOAuthClientSecret();
-}

Powered by Google App Engine
This is Rietveld 408576698