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

Unified Diff: ppapi/proxy/error_conversion.h

Issue 22923014: TCPSockets are switched to the new Pepper proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix. Created 7 years, 4 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: ppapi/proxy/error_conversion.h
diff --git a/ppapi/proxy/error_conversion.h b/ppapi/proxy/error_conversion.h
new file mode 100644
index 0000000000000000000000000000000000000000..30ec3a50d495f56256128bc3762d68bd5f3f93e3
--- /dev/null
+++ b/ppapi/proxy/error_conversion.h
@@ -0,0 +1,28 @@
+// Copyright 2013 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 PPAPI_PROXY_ERROR_CONVERSION_H_
+#define PPAPI_PROXY_ERROR_CONVERSION_H_
+
+#include "ppapi/c/pp_stdint.h"
+#include "ppapi/proxy/ppapi_proxy_export.h"
+
+namespace ppapi {
+namespace proxy {
+
+// Converts a net::Error code to a PP_Error code.
+// Returns the same value as |net_error| if |net_error| is a positive number.
+PPAPI_PROXY_EXPORT int32_t NetErrorToPepperError(int net_error);
+
+// When |private_api| is true, coverts all network-related errors +;
+// PP_ERROR_NOACCESS to PP_ERROR_FAILED. Otherwise, returns |pp_error|
+// as is.
+PPAPI_PROXY_EXPORT int32_t ConvertNetworkAPIErrorForCompatibility(
+ int32_t pp_error,
+ bool private_api);
+
+} // namespace proxy
+} // namespace ppapi
+
+#endif // PPAPI_PROXY_ERROR_CONVERSION_H_
« ppapi/proxy/DEPS ('K') | « ppapi/proxy/DEPS ('k') | ppapi/proxy/error_conversion.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698