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

Unified Diff: remoting/android/java/src/org/chromium/chromoting/HostListLoader.java

Issue 633703004: Android Chromoting: Don't include API key with Directory request (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove client_id/client_secret from request Created 6 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/android/java/src/org/chromium/chromoting/HostListLoader.java
diff --git a/remoting/android/java/src/org/chromium/chromoting/HostListLoader.java b/remoting/android/java/src/org/chromium/chromoting/HostListLoader.java
index bfcdfd8adac22dac6e0870222cb4a277ae9d73e8..05a631e0c019311f19f00451ee711efe419d18b8 100644
--- a/remoting/android/java/src/org/chromium/chromoting/HostListLoader.java
+++ b/remoting/android/java/src/org/chromium/chromoting/HostListLoader.java
@@ -9,7 +9,6 @@ import android.os.HandlerThread;
import android.os.Looper;
import android.util.Log;
-import org.chromium.chromoting.jni.JniInterface;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@@ -42,7 +41,7 @@ public class HostListLoader {
/** Path from which to download a user's host list JSON object. */
private static final String HOST_LIST_PATH =
- "https://www.googleapis.com/chromoting/v1/@me/hosts?key=";
+ "https://www.googleapis.com/chromoting/v1/@me/hosts";
/** Callback handler to be used for network operations. */
private Handler mNetworkThread;
@@ -86,10 +85,7 @@ public class HostListLoader {
HttpURLConnection link = null;
String response = null;
try {
- link = (HttpURLConnection)
- new URL(HOST_LIST_PATH + JniInterface.nativeGetApiKey()).openConnection();
- link.addRequestProperty("client_id", JniInterface.nativeGetClientId());
- link.addRequestProperty("client_secret", JniInterface.nativeGetClientSecret());
+ link = (HttpURLConnection) new URL(HOST_LIST_PATH).openConnection();
link.setRequestProperty("Authorization", "OAuth " + authToken);
// Listen for the server to respond.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698