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

Unified Diff: components/devtools_bridge/android/java/src/org/chromium/components/devtools_bridge/gcd/InstanceCredential.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/gcd/InstanceCredential.java
diff --git a/components/devtools_bridge/android/java/src/org/chromium/components/devtools_bridge/gcd/InstanceCredential.java b/components/devtools_bridge/android/java/src/org/chromium/components/devtools_bridge/gcd/InstanceCredential.java
deleted file mode 100644
index 7edb8077f1953f78b1c28268e0b62a158264489c..0000000000000000000000000000000000000000
--- a/components/devtools_bridge/android/java/src/org/chromium/components/devtools_bridge/gcd/InstanceCredential.java
+++ /dev/null
@@ -1,49 +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.gcd;
-
-import android.content.SharedPreferences;
-
-/**
- * Information provided by GCD when instance has registered. Instance id
- * can be used for:
- * 1. Making sure incoming messages are addressed to the instance.
- * 2. It needed when sending command results to GCD.
- * 3. For device unregistration.
- *
- * The Secret supposed to be used to authenticate the instance with OAuthClient
- * (it has no user credentials).
- */
-public final class InstanceCredential {
- public static final String PREF_ID = "gcd.ID";
- public static final String PREF_SECRET = "gcd.SECRET";
-
- public final String id;
- public final String secret;
-
- public InstanceCredential(String id, String secret) {
- assert id != null;
- assert secret != null;
-
- this.id = id;
- this.secret = secret;
- }
-
- public static InstanceCredential get(SharedPreferences preferences) {
- String id = preferences.getString(PREF_ID, null);
- String secret = preferences.getString(PREF_SECRET, null);
- return id != null && secret != null ? new InstanceCredential(id, secret) : null;
- }
-
- public void put(SharedPreferences.Editor editor) {
- editor.putString(PREF_ID, id);
- editor.putString(PREF_SECRET, secret);
- }
-
- public static void remove(SharedPreferences.Editor editor) {
- editor.remove(PREF_ID);
- editor.remove(PREF_SECRET);
- }
-}

Powered by Google App Engine
This is Rietveld 408576698