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

Side by Side Diff: chrome/browser/sync_file_system/sync_status_code.cc

Issue 22810002: SyncFS: Reorder initialization sequence of SyncFileSystemService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 3 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 | « chrome/browser/sync_file_system/sync_status_code.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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/sync_file_system/sync_status_code.h" 5 #include "chrome/browser/sync_file_system/sync_status_code.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "third_party/leveldatabase/src/include/leveldb/db.h" 8 #include "third_party/leveldatabase/src/include/leveldb/db.h"
9 9
10 namespace sync_file_system { 10 namespace sync_file_system {
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 return SYNC_FILE_ERROR_NOT_EMPTY; 141 return SYNC_FILE_ERROR_NOT_EMPTY;
142 case base::PLATFORM_FILE_ERROR_INVALID_URL: 142 case base::PLATFORM_FILE_ERROR_INVALID_URL:
143 return SYNC_FILE_ERROR_INVALID_URL; 143 return SYNC_FILE_ERROR_INVALID_URL;
144 case base::PLATFORM_FILE_ERROR_IO: 144 case base::PLATFORM_FILE_ERROR_IO:
145 return SYNC_FILE_ERROR_IO; 145 return SYNC_FILE_ERROR_IO;
146 default: 146 default:
147 return SYNC_FILE_ERROR_FAILED; 147 return SYNC_FILE_ERROR_FAILED;
148 } 148 }
149 } 149 }
150 150
151 base::PlatformFileError SyncStatusCodeToPlatformFileError(
152 SyncStatusCode status) {
153 switch (status) {
154 case SYNC_STATUS_OK:
155 return base::PLATFORM_FILE_OK;
156 case SYNC_FILE_ERROR_FAILED:
157 return base::PLATFORM_FILE_ERROR_FAILED;
158 case SYNC_FILE_ERROR_IN_USE:
159 return base::PLATFORM_FILE_ERROR_IN_USE;
160 case SYNC_FILE_ERROR_EXISTS:
161 return base::PLATFORM_FILE_ERROR_EXISTS;
162 case SYNC_FILE_ERROR_NOT_FOUND:
163 return base::PLATFORM_FILE_ERROR_NOT_FOUND;
164 case SYNC_FILE_ERROR_ACCESS_DENIED:
165 return base::PLATFORM_FILE_ERROR_ACCESS_DENIED;
166 case SYNC_FILE_ERROR_TOO_MANY_OPENED:
167 return base::PLATFORM_FILE_ERROR_TOO_MANY_OPENED;
168 case SYNC_FILE_ERROR_NO_MEMORY:
169 return base::PLATFORM_FILE_ERROR_NO_MEMORY;
170 case SYNC_FILE_ERROR_NO_SPACE:
171 return base::PLATFORM_FILE_ERROR_NO_SPACE;
172 case SYNC_FILE_ERROR_NOT_A_DIRECTORY:
173 return base::PLATFORM_FILE_ERROR_NOT_A_DIRECTORY;
174 case SYNC_FILE_ERROR_INVALID_OPERATION:
175 return base::PLATFORM_FILE_ERROR_INVALID_OPERATION;
176 case SYNC_FILE_ERROR_SECURITY:
177 return base::PLATFORM_FILE_ERROR_SECURITY;
178 case SYNC_FILE_ERROR_ABORT:
179 return base::PLATFORM_FILE_ERROR_ABORT;
180 case SYNC_FILE_ERROR_NOT_A_FILE:
181 return base::PLATFORM_FILE_ERROR_NOT_A_FILE;
182 case SYNC_FILE_ERROR_NOT_EMPTY:
183 return base::PLATFORM_FILE_ERROR_NOT_EMPTY;
184 case SYNC_FILE_ERROR_INVALID_URL:
185 return base::PLATFORM_FILE_ERROR_INVALID_URL;
186 case SYNC_FILE_ERROR_IO:
187 return base::PLATFORM_FILE_ERROR_IO;
188 default:
189 return base::PLATFORM_FILE_ERROR_FAILED;
190 }
191 }
192
151 } // namespace sync_file_system 193 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « chrome/browser/sync_file_system/sync_status_code.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698