Chromium Code Reviews| 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_ |