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

Side by Side Diff: webkit/plugins/ppapi/error_util.cc

Issue 7038032: Fix PP_FileOpenFlags_Dev handling: (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: . Created 9 years, 7 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
« no previous file with comments | « webkit/plugins/ppapi/error_util.h ('k') | webkit/plugins/ppapi/file_callbacks.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 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 "webkit/plugins/ppapi/error_util.h"
6
7 #include "ppapi/c/pp_errors.h"
8
9 namespace webkit {
10 namespace ppapi {
11
12 int PlatformFileErrorToPepperError(base::PlatformFileError error_code) {
13 switch (error_code) {
14 case base::PLATFORM_FILE_OK:
15 return PP_OK;
16 case base::PLATFORM_FILE_ERROR_EXISTS:
17 return PP_ERROR_FILEEXISTS;
18 case base::PLATFORM_FILE_ERROR_NOT_FOUND:
19 return PP_ERROR_FILENOTFOUND;
20 case base::PLATFORM_FILE_ERROR_ACCESS_DENIED:
21 case base::PLATFORM_FILE_ERROR_SECURITY:
22 return PP_ERROR_NOACCESS;
23 case base::PLATFORM_FILE_ERROR_NO_MEMORY:
24 return PP_ERROR_NOMEMORY;
25 case base::PLATFORM_FILE_ERROR_NO_SPACE:
26 return PP_ERROR_NOSPACE;
27 case base::PLATFORM_FILE_ERROR_NOT_A_DIRECTORY:
28 return PP_ERROR_FAILED;
29 default:
30 return PP_ERROR_FAILED;
31 }
32 }
33
34 } // namespace ppapi
35 } // namespace webkit
36
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/error_util.h ('k') | webkit/plugins/ppapi/file_callbacks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698