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

Unified Diff: components/devtools_bridge/android/java/src/org/chromium/components/devtools_bridge/gcd/Notification.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/Notification.java
diff --git a/components/devtools_bridge/android/java/src/org/chromium/components/devtools_bridge/gcd/Notification.java b/components/devtools_bridge/android/java/src/org/chromium/components/devtools_bridge/gcd/Notification.java
deleted file mode 100644
index e8899f4082e54f18fe4fa5fcfd90dabdb8b1fb47..0000000000000000000000000000000000000000
--- a/components/devtools_bridge/android/java/src/org/chromium/components/devtools_bridge/gcd/Notification.java
+++ /dev/null
@@ -1,63 +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.util.JsonReader;
-
-import org.chromium.components.devtools_bridge.commands.Command;
-import org.chromium.components.devtools_bridge.commands.CommandFormatException;
-
-import java.io.IOException;
-import java.io.StringReader;
-
-/**
- * Notification that GCD sends to an instance.
- */
-public final class Notification {
- public final String instanceId;
- public final Type type;
- public final Command command;
-
- public enum Type {
- COMMAND_CREATED, // Command created and needs to be executed.
- INSTANCE_UNREGISTERED // Instance unregistered (possibly through external UI).
- }
-
- Notification(String instanceId, Type type, Command command) {
- this.instanceId = instanceId;
- this.type = type;
- this.command = command;
- }
-
- public static Notification read(String source) throws FormatException {
- JsonReader reader = new JsonReader(new StringReader(source));
- try {
- Notification result = new MessageReader(reader).readNotification();
- reader.close();
- return result;
- } catch (CommandFormatException e) {
- throw new FormatException(e);
- } catch (IllegalStateException e) {
- throw new FormatException(e);
- } catch (IllegalArgumentException e) {
- throw new FormatException(e);
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Exception when parsing notification.
- */
- public static class FormatException extends Exception {
- public FormatException(RuntimeException cause) {
- super(cause);
- }
-
- public FormatException(CommandFormatException cause) {
- super(cause);
- }
- }
-}

Powered by Google App Engine
This is Rietveld 408576698