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

Side by Side Diff: ppapi/proxy/pp_utils.cc

Issue 22923014: TCPSockets are switched to the new Pepper proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ppapi/proxy/pp_utils.h"
6
7 #include "ppapi/c/pp_errors.h"
8
9 namespace ppapi {
10 namespace proxy {
11 namespace pp_utils {
12
13 int32_t ConvertPPError(int32_t pp_error, bool private_api) {
14 // The private API doesn't return network-specific error codes or
15 // PP_ERROR_NOACCESS. In order to preserve the behavior, we convert those to
16 // PP_ERROR_FAILED.
17 if (private_api &&
18 (pp_error <= PP_ERROR_CONNECTION_CLOSED ||
19 pp_error == PP_ERROR_NOACCESS)) {
20 return PP_ERROR_FAILED;
21 }
22 return pp_error;
23 }
24
25 } // namespace pp_utils
26 } // namespace proxy
27 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698