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

Side by Side Diff: webkit/browser/fileapi/file_system_quota_client.cc

Issue 145303002: Convert Media Galleries to use base::File (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 10 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 "webkit/browser/fileapi/file_system_quota_client.h" 5 #include "webkit/browser/fileapi/file_system_quota_client.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 callback.Run(*origins_ptr); 63 callback.Run(*origins_ptr);
64 } 64 }
65 65
66 quota::QuotaStatusCode DeleteOriginOnFileTaskRunner( 66 quota::QuotaStatusCode DeleteOriginOnFileTaskRunner(
67 FileSystemContext* context, 67 FileSystemContext* context,
68 const GURL& origin, 68 const GURL& origin,
69 FileSystemType type) { 69 FileSystemType type) {
70 FileSystemBackend* provider = context->GetFileSystemBackend(type); 70 FileSystemBackend* provider = context->GetFileSystemBackend(type);
71 if (!provider || !provider->GetQuotaUtil()) 71 if (!provider || !provider->GetQuotaUtil())
72 return quota::kQuotaErrorNotSupported; 72 return quota::kQuotaErrorNotSupported;
73 base::PlatformFileError result = 73 base::File::Error result =
74 provider->GetQuotaUtil()->DeleteOriginDataOnFileTaskRunner( 74 provider->GetQuotaUtil()->DeleteOriginDataOnFileTaskRunner(
75 context, context->quota_manager_proxy(), origin, type); 75 context, context->quota_manager_proxy(), origin, type);
76 if (result == base::PLATFORM_FILE_OK) 76 if (result == base::File::FILE_OK)
77 return quota::kQuotaStatusOk; 77 return quota::kQuotaStatusOk;
78 return quota::kQuotaErrorInvalidModification; 78 return quota::kQuotaErrorInvalidModification;
79 } 79 }
80 80
81 } // namespace 81 } // namespace
82 82
83 FileSystemQuotaClient::FileSystemQuotaClient( 83 FileSystemQuotaClient::FileSystemQuotaClient(
84 FileSystemContext* file_system_context, 84 FileSystemContext* file_system_context,
85 bool is_incognito) 85 bool is_incognito)
86 : file_system_context_(file_system_context), 86 : file_system_context_(file_system_context),
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 FileSystemType type = QuotaStorageTypeToFileSystemType(storage_type); 201 FileSystemType type = QuotaStorageTypeToFileSystemType(storage_type);
202 DCHECK(type != kFileSystemTypeUnknown); 202 DCHECK(type != kFileSystemTypeUnknown);
203 return file_system_context_->IsSandboxFileSystem(type); 203 return file_system_context_->IsSandboxFileSystem(type);
204 } 204 }
205 205
206 base::SequencedTaskRunner* FileSystemQuotaClient::file_task_runner() const { 206 base::SequencedTaskRunner* FileSystemQuotaClient::file_task_runner() const {
207 return file_system_context_->default_file_task_runner(); 207 return file_system_context_->default_file_task_runner();
208 } 208 }
209 209
210 } // namespace fileapi 210 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/file_system_operation_runner.cc ('k') | webkit/browser/fileapi/file_system_quota_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698