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

Side by Side Diff: chrome/browser/chromeos/drive/file_errors.cc

Issue 391343002: Keep sync tasks alive as long as it's not finished (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
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/file_errors.h" 5 #include "chrome/browser/chromeos/drive/file_errors.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace drive { 9 namespace drive {
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 return "FILE_ERROR_INVALID_URL"; 59 return "FILE_ERROR_INVALID_URL";
60 60
61 case FILE_ERROR_NO_CONNECTION: 61 case FILE_ERROR_NO_CONNECTION:
62 return "FILE_ERROR_NO_CONNECTION"; 62 return "FILE_ERROR_NO_CONNECTION";
63 63
64 case FILE_ERROR_NO_LOCAL_SPACE: 64 case FILE_ERROR_NO_LOCAL_SPACE:
65 return "FILE_ERROR_NO_LOCAL_SPACE"; 65 return "FILE_ERROR_NO_LOCAL_SPACE";
66 66
67 case FILE_ERROR_SERVICE_UNAVAILABLE: 67 case FILE_ERROR_SERVICE_UNAVAILABLE:
68 return "FILE_ERROR_SERVICE_UNAVAILABLE"; 68 return "FILE_ERROR_SERVICE_UNAVAILABLE";
69
70 case FILE_ERROR_PARENT_NEEDS_TO_BE_SYNCED:
71 return "FILE_ERROR_PARENT_NEEDS_TO_BE_SYNCED";
69 } 72 }
70 73
71 NOTREACHED(); 74 NOTREACHED();
72 return ""; 75 return "";
73 } 76 }
74 77
75 base::File::Error FileErrorToBaseFileError(FileError error) { 78 base::File::Error FileErrorToBaseFileError(FileError error) {
76 switch (error) { 79 switch (error) {
77 case FILE_ERROR_OK: 80 case FILE_ERROR_OK:
78 return base::File::FILE_OK; 81 return base::File::FILE_OK;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 return base::File::FILE_ERROR_INVALID_URL; 126 return base::File::FILE_ERROR_INVALID_URL;
124 127
125 case FILE_ERROR_NO_CONNECTION: 128 case FILE_ERROR_NO_CONNECTION:
126 return base::File::FILE_ERROR_FAILED; 129 return base::File::FILE_ERROR_FAILED;
127 130
128 case FILE_ERROR_NO_LOCAL_SPACE: 131 case FILE_ERROR_NO_LOCAL_SPACE:
129 return base::File::FILE_ERROR_FAILED; 132 return base::File::FILE_ERROR_FAILED;
130 133
131 case FILE_ERROR_SERVICE_UNAVAILABLE: 134 case FILE_ERROR_SERVICE_UNAVAILABLE:
132 return base::File::FILE_ERROR_FAILED; 135 return base::File::FILE_ERROR_FAILED;
136
137 case FILE_ERROR_PARENT_NEEDS_TO_BE_SYNCED:
138 return base::File::FILE_ERROR_FAILED;
133 } 139 }
134 140
135 NOTREACHED(); 141 NOTREACHED();
136 return base::File::FILE_ERROR_FAILED; 142 return base::File::FILE_ERROR_FAILED;
137 } 143 }
138 144
139 FileError GDataToFileError(google_apis::GDataErrorCode status) { 145 FileError GDataToFileError(google_apis::GDataErrorCode status) {
140 switch (status) { 146 switch (status) {
141 case google_apis::HTTP_SUCCESS: 147 case google_apis::HTTP_SUCCESS:
142 case google_apis::HTTP_CREATED: 148 case google_apis::HTTP_CREATED:
(...skipping 15 matching lines...) Expand all
158 case google_apis::GDATA_NO_CONNECTION: 164 case google_apis::GDATA_NO_CONNECTION:
159 return FILE_ERROR_NO_CONNECTION; 165 return FILE_ERROR_NO_CONNECTION;
160 case google_apis::GDATA_NO_SPACE: 166 case google_apis::GDATA_NO_SPACE:
161 return FILE_ERROR_NO_SERVER_SPACE; 167 return FILE_ERROR_NO_SERVER_SPACE;
162 default: 168 default:
163 return FILE_ERROR_FAILED; 169 return FILE_ERROR_FAILED;
164 } 170 }
165 } 171 }
166 172
167 } // namespace drive 173 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698