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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/omaha/RequestFailureException.java

Issue 67313003: Upstream the updated Java Omaha XML parser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing nits Created 6 years, 11 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 | chrome/android/java/src/org/chromium/chrome/browser/omaha/ResponseParser.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/omaha/RequestFailureException.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/RequestFailureException.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/RequestFailureException.java
new file mode 100644
index 0000000000000000000000000000000000000000..33547eed4ab073d1fa4530a54c246986bdb38c7c
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omaha/RequestFailureException.java
@@ -0,0 +1,42 @@
+// 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.chrome.browser.omaha;
+
+/**
+ * Serves as a general exception for failed POST requests to the Omaha Update Server.
+ */
+public class RequestFailureException extends Exception {
+ public static final int ERROR_UNDEFINED = 0;
+ public static final int ERROR_MALFORMED_XML = 1;
+ public static final int ERROR_PARSE_ROOT = 2;
+ public static final int ERROR_PARSE_RESPONSE = 3;
+ public static final int ERROR_PARSE_DAYSTART = 4;
+ public static final int ERROR_PARSE_APP = 5;
+ public static final int ERROR_PARSE_PING = 6;
+ public static final int ERROR_PARSE_EVENT = 7;
+ public static final int ERROR_PARSE_URLS = 8;
+ public static final int ERROR_PARSE_UPDATECHECK = 9;
+ public static final int ERROR_PARSE_MANIFEST = 10;
+
+ public int errorCode = ERROR_UNDEFINED;
+
+ public RequestFailureException(String message) {
+ this(message, ERROR_UNDEFINED);
+ }
+
+ public RequestFailureException(String message, int error) {
+ super(message);
+ errorCode = error;
+ }
+
+ public RequestFailureException(String message, Throwable cause) {
+ this(message, cause, ERROR_UNDEFINED);
+ }
+
+ public RequestFailureException(String message, Throwable cause, int error) {
+ super(message, cause);
+ errorCode = error;
+ }
+}
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/omaha/ResponseParser.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698