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

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

Issue 10828043: Wire up the deleteFileSystem operation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Corrects wrong return value check. Created 8 years, 4 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/fileapi/file_system_quota_client.h" 5 #include "webkit/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/file_path.h" 10 #include "base/file_path.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 status_(quota::kQuotaStatusUnknown), 146 status_(quota::kQuotaStatusUnknown),
147 callback_(callback) { 147 callback_(callback) {
148 } 148 }
149 149
150 protected: 150 protected:
151 virtual ~DeleteOriginTask() {} 151 virtual ~DeleteOriginTask() {}
152 152
153 // QuotaThreadTask: 153 // QuotaThreadTask:
154 virtual void RunOnTargetThread() OVERRIDE { 154 virtual void RunOnTargetThread() OVERRIDE {
155 if (file_system_context_->DeleteDataForOriginAndTypeOnFileThread( 155 if (file_system_context_->DeleteDataForOriginAndTypeOnFileThread(
156 origin_, type_)) 156 origin_, type_) == base::PLATFORM_FILE_OK)
157 status_ = quota::kQuotaStatusOk; 157 status_ = quota::kQuotaStatusOk;
158 else 158 else
159 status_ = quota::kQuotaErrorInvalidModification; 159 status_ = quota::kQuotaErrorInvalidModification;
160 } 160 }
161 161
162 virtual void Completed() OVERRIDE { 162 virtual void Completed() OVERRIDE {
163 callback_.Run(status_); 163 callback_.Run(status_);
164 } 164 }
165 165
166 private: 166 private:
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 DCHECK(pending_origins_for_host_callbacks_.HasCallbacks(type_and_host)); 287 DCHECK(pending_origins_for_host_callbacks_.HasCallbacks(type_and_host));
288 pending_origins_for_host_callbacks_.Run(type_and_host, origins, 288 pending_origins_for_host_callbacks_.Run(type_and_host, origins,
289 FileSystemTypeToQuotaStorageType(type_and_host.first)); 289 FileSystemTypeToQuotaStorageType(type_and_host.first));
290 } 290 }
291 291
292 base::SequencedTaskRunner* FileSystemQuotaClient::file_task_runner() const { 292 base::SequencedTaskRunner* FileSystemQuotaClient::file_task_runner() const {
293 return file_system_context_->file_task_runner(); 293 return file_system_context_->file_task_runner();
294 } 294 }
295 295
296 } // namespace fileapi 296 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698