17d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved. 27d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 37d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)// found in the LICENSE file. 47d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 57d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#ifndef PPAPI_HOST_ERROR_CONVERSION_H_ 67d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#define PPAPI_HOST_ERROR_CONVERSION_H_ 77d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 87d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#include "ppapi/c/pp_stdint.h" 97d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#include "ppapi/host/ppapi_host_export.h" 107d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 117d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)namespace ppapi { 127d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)namespace host { 137d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 147d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)// Converts a net::Error code to a PP_Error code. 157d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)// Returns the same value as |net_error| if |net_error| is a positive number. 167d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)PPAPI_HOST_EXPORT int32_t NetErrorToPepperError(int net_error); 177d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 187d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} // namespace host 197d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)} // namespace ppapi 207d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles) 217d4cd473f85ac64c3747c96c277f9e506a0d2246Torne (Richard Coles)#endif // PPAPI_HOST_ERROR_CONVERSION_H_ 22