OLD | NEW |
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/drive_backend/drive_backend_util.h" | 5 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_util.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 return SYNC_FILE_ERROR_FAILED; | 123 return SYNC_FILE_ERROR_FAILED; |
124 | 124 |
125 case google_apis::HTTP_FORBIDDEN: | 125 case google_apis::HTTP_FORBIDDEN: |
126 return SYNC_STATUS_ACCESS_FORBIDDEN; | 126 return SYNC_STATUS_ACCESS_FORBIDDEN; |
127 | 127 |
128 case google_apis::HTTP_RESUME_INCOMPLETE: | 128 case google_apis::HTTP_RESUME_INCOMPLETE: |
129 case google_apis::HTTP_BAD_REQUEST: | 129 case google_apis::HTTP_BAD_REQUEST: |
130 case google_apis::HTTP_LENGTH_REQUIRED: | 130 case google_apis::HTTP_LENGTH_REQUIRED: |
131 case google_apis::HTTP_NOT_IMPLEMENTED: | 131 case google_apis::HTTP_NOT_IMPLEMENTED: |
132 case google_apis::DRIVE_PARSE_ERROR: | 132 case google_apis::DRIVE_PARSE_ERROR: |
| 133 case google_apis::DRIVE_RESPONSE_TOO_LARGE: |
133 case google_apis::DRIVE_OTHER_ERROR: | 134 case google_apis::DRIVE_OTHER_ERROR: |
134 return SYNC_STATUS_FAILED; | 135 return SYNC_STATUS_FAILED; |
135 | 136 |
136 case google_apis::DRIVE_NO_SPACE: | 137 case google_apis::DRIVE_NO_SPACE: |
137 return SYNC_FILE_ERROR_NO_SPACE; | 138 return SYNC_FILE_ERROR_NO_SPACE; |
138 } | 139 } |
139 | 140 |
140 // There's a case where DriveService layer returns DriveApiErrorCode==-1 | 141 // There's a case where DriveService layer returns DriveApiErrorCode==-1 |
141 // when network is unavailable. (http://crbug.com/223042) | 142 // when network is unavailable. (http://crbug.com/223042) |
142 // TODO(kinuko,nhiroki): We should identify from where this undefined error | 143 // TODO(kinuko,nhiroki): We should identify from where this undefined error |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 } else if (status.IsNotFound()) { | 180 } else if (status.IsNotFound()) { |
180 service_metadata.reset(new ServiceMetadata); | 181 service_metadata.reset(new ServiceMetadata); |
181 service_metadata->set_next_tracker_id(1); | 182 service_metadata->set_next_tracker_id(1); |
182 } | 183 } |
183 | 184 |
184 return service_metadata.Pass(); | 185 return service_metadata.Pass(); |
185 } | 186 } |
186 | 187 |
187 } // namespace drive_backend | 188 } // namespace drive_backend |
188 } // namespace sync_file_system | 189 } // namespace sync_file_system |
OLD | NEW |