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

Unified Diff: ios/web/public/web_state/error_translation_util.h

Issue 1178063007: Updated error translation logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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: ios/web/public/web_state/error_translation_util.h
diff --git a/ios/web/public/web_state/error_translation_util.h b/ios/web/public/web_state/error_translation_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..e4a8222e64c946a0b354d18f22af2283254c6580
--- /dev/null
+++ b/ios/web/public/web_state/error_translation_util.h
@@ -0,0 +1,24 @@
+// Copyright 2015 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.
+
+#ifndef IOS_WEB_PUBLIC_WEB_STATE_ERROR_TRANSLATION_UTIL_H_
+#define IOS_WEB_PUBLIC_WEB_STATE_ERROR_TRANSLATION_UTIL_H_
+
+#import <Foundation/Foundation.h>
+
+namespace web {
+
+// Iterates through |error|'s underlying errors and returns the first error for
+// which there is no underlying error.
+NSError* GetUltimateUnderlyingErrorForError(NSError* error);
Eugene But (OOO till 7-30) 2015/06/19 00:52:01 NIT: How about Final instead of Ultimate?
Eugene But (OOO till 7-30) 2015/06/19 00:52:01 NIT: s/For/From
kkhorimoto 2015/06/23 20:33:58 Done.
+
+// Translates iOS-specific errors into their net error equivalent. If a valid
+// translation is found, a copy of |error| is returned with the translation as
+// its ultimate underlying error. If there is no viable translation, the
+// original error is returned.
+NSError* NetErrorFromError(NSError* error);
Eugene But (OOO till 7-30) 2015/06/19 00:52:01 I believe this method should not be a part of web'
kkhorimoto 2015/06/23 20:33:58 The main reason I moved these files to the public
+
+} // namespace web
+
+#endif // IOS_WEB_PUBLIC_WEB_STATE_ERROR_TRANSLATION_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698