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

Unified Diff: components/devtools_bridge/android/java/src/org/chromium/components/devtools_bridge/gcd/InstanceDescription.java

Issue 677843006: Registration of DevTools bridge in GCD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gcm-signaling
Patch Set: 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
Index: components/devtools_bridge/android/java/src/org/chromium/components/devtools_bridge/gcd/InstanceDescription.java
diff --git a/components/devtools_bridge/android/java/src/org/chromium/components/devtools_bridge/gcd/InstanceDescription.java b/components/devtools_bridge/android/java/src/org/chromium/components/devtools_bridge/gcd/InstanceDescription.java
new file mode 100644
index 0000000000000000000000000000000000000000..6d740bb748f8d018ff41c64883b8a52b28b9600b
--- /dev/null
+++ b/components/devtools_bridge/android/java/src/org/chromium/components/devtools_bridge/gcd/InstanceDescription.java
@@ -0,0 +1,55 @@
+// 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;
+
+/**
+ * Information needed for registration in GCD.
+ * Instance secret will be bound to oAuthClientId.
+ * gcmChannelId will be used for delivering commands.
+ * displayName is a human readable name on the client side.
+ */
+public final class InstanceDescription {
+ public final String oAuthClientId;
+ public final String gcmChannelId;
+ public final String displayName;
+
+ private InstanceDescription(String oAuthClientId, String gcmChannelId, String displayName) {
+ assert oAuthClientId != null;
+ assert gcmChannelId != null;
+ assert displayName != null;
+
+ this.oAuthClientId = oAuthClientId;
+ this.gcmChannelId = gcmChannelId;
+ this.displayName = displayName;
+ }
+
+ /**
+ * Builder for InstanceDescription.
+ */
+ public static final class Builder {
+ private String mOAuthClientId;
+ private String mGCMChannelId;
+ private String mDisplayName;
+
+ public Builder setOAuthClientId(String value) {
+ mOAuthClientId = value;
+ return this;
+ }
+
+ public Builder setGCMChannelId(String value) {
+ mGCMChannelId = value;
+ return this;
+ }
+
+ public Builder setDisplayName(String value) {
+ mDisplayName = value;
+ return this;
+ }
+
+ public InstanceDescription build() {
+ return new InstanceDescription(mOAuthClientId, mGCMChannelId, mDisplayName);
+ }
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698