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

Side by Side Diff: storage/common/fileapi/file_system_util.cc

Issue 1102353009: WIP Durable storage, chrome side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 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
« no previous file with comments | « storage/browser/quota/quota_manager.cc ('k') | storage/common/quota/quota_types.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "storage/common/fileapi/file_system_util.h" 5 #include "storage/common/fileapi/file_system_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 switch (storage_type) { 247 switch (storage_type) {
248 case storage::kStorageTypeTemporary: 248 case storage::kStorageTypeTemporary:
249 return kFileSystemTypeTemporary; 249 return kFileSystemTypeTemporary;
250 case storage::kStorageTypePersistent: 250 case storage::kStorageTypePersistent:
251 return kFileSystemTypePersistent; 251 return kFileSystemTypePersistent;
252 case storage::kStorageTypeSyncable: 252 case storage::kStorageTypeSyncable:
253 return kFileSystemTypeSyncable; 253 return kFileSystemTypeSyncable;
254 case storage::kStorageTypeQuotaNotManaged: 254 case storage::kStorageTypeQuotaNotManaged:
255 case storage::kStorageTypeUnknown: 255 case storage::kStorageTypeUnknown:
256 return kFileSystemTypeUnknown; 256 return kFileSystemTypeUnknown;
257 case storage::kStorageTypeDurable:
258 NOTREACHED() << "FIXME";
259 return kFileSystemTypeUnknown;
257 } 260 }
258 return kFileSystemTypeUnknown; 261 return kFileSystemTypeUnknown;
259 } 262 }
260 263
261 storage::StorageType FileSystemTypeToQuotaStorageType(FileSystemType type) { 264 storage::StorageType FileSystemTypeToQuotaStorageType(FileSystemType type) {
262 switch (type) { 265 switch (type) {
263 case kFileSystemTypeTemporary: 266 case kFileSystemTypeTemporary:
264 return storage::kStorageTypeTemporary; 267 return storage::kStorageTypeTemporary;
265 case kFileSystemTypePersistent: 268 case kFileSystemTypePersistent:
266 return storage::kStorageTypePersistent; 269 return storage::kStorageTypePersistent;
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 return base::File::FILE_ERROR_ABORT; 502 return base::File::FILE_ERROR_ABORT;
500 case net::ERR_ADDRESS_INVALID: 503 case net::ERR_ADDRESS_INVALID:
501 case net::ERR_INVALID_URL: 504 case net::ERR_INVALID_URL:
502 return base::File::FILE_ERROR_INVALID_URL; 505 return base::File::FILE_ERROR_INVALID_URL;
503 default: 506 default:
504 return base::File::FILE_ERROR_FAILED; 507 return base::File::FILE_ERROR_FAILED;
505 } 508 }
506 } 509 }
507 510
508 } // namespace storage 511 } // namespace storage
OLDNEW
« no previous file with comments | « storage/browser/quota/quota_manager.cc ('k') | storage/common/quota/quota_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698