OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/drive/drive_file_error.h" | 5 #include "chrome/browser/chromeos/drive/drive_file_error.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace gdata { | 9 namespace drive { |
10 | 10 |
11 base::PlatformFileError DriveFileErrorToPlatformError(DriveFileError error) { | 11 base::PlatformFileError DriveFileErrorToPlatformError(DriveFileError error) { |
12 switch (error) { | 12 switch (error) { |
13 case DRIVE_FILE_OK: | 13 case DRIVE_FILE_OK: |
14 return base::PLATFORM_FILE_OK; | 14 return base::PLATFORM_FILE_OK; |
15 | 15 |
16 case DRIVE_FILE_ERROR_FAILED: | 16 case DRIVE_FILE_ERROR_FAILED: |
17 return base::PLATFORM_FILE_ERROR_FAILED; | 17 return base::PLATFORM_FILE_ERROR_FAILED; |
18 | 18 |
19 case DRIVE_FILE_ERROR_IN_USE: | 19 case DRIVE_FILE_ERROR_IN_USE: |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 return base::PLATFORM_FILE_ERROR_INVALID_URL; | 59 return base::PLATFORM_FILE_ERROR_INVALID_URL; |
60 | 60 |
61 case DRIVE_FILE_ERROR_NO_CONNECTION: | 61 case DRIVE_FILE_ERROR_NO_CONNECTION: |
62 return base::PLATFORM_FILE_ERROR_FAILED; | 62 return base::PLATFORM_FILE_ERROR_FAILED; |
63 } | 63 } |
64 | 64 |
65 NOTREACHED(); | 65 NOTREACHED(); |
66 return base::PLATFORM_FILE_ERROR_FAILED; | 66 return base::PLATFORM_FILE_ERROR_FAILED; |
67 } | 67 } |
68 | 68 |
69 } // namespace gdata | 69 } // namespace drive |
OLD | NEW |