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

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

Issue 2594723002: Count number of origins with data affected by clearing "cookies and site data". (Closed)
Patch Set: Add comments for issues with incomplete data deletion Created 3 years, 11 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
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/browser/fileapi/file_system_quota_client.h" 5 #include "storage/browser/fileapi/file_system_quota_client.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 FROM_HERE, base::Bind(&GetOriginsForHostOnFileTaskRunner, 160 FROM_HERE, base::Bind(&GetOriginsForHostOnFileTaskRunner,
161 base::RetainedRef(file_system_context_), 161 base::RetainedRef(file_system_context_),
162 storage_type, host, base::Unretained(origins_ptr)), 162 storage_type, host, base::Unretained(origins_ptr)),
163 base::Bind(&DidGetOrigins, callback, base::Owned(origins_ptr))); 163 base::Bind(&DidGetOrigins, callback, base::Owned(origins_ptr)));
164 } 164 }
165 165
166 void FileSystemQuotaClient::DeleteOriginData( 166 void FileSystemQuotaClient::DeleteOriginData(
167 const GURL& origin, 167 const GURL& origin,
168 StorageType type, 168 StorageType type,
169 const DeletionCallback& callback) { 169 const DeletionCallback& callback) {
170 // TODO? This method only deletes filesytem entries associated with a quota
msramek 2017/01/09 12:54:44 Let's ask FS owners about this.
dullweber 2017/01/09 16:05:46 I created http://crbug.com/679362 for it.
171 // type but there are much more kinds of filesystems, which don't get deleted?
172 // Maybe use FileSystemContext::DeleteDataForOriginOnFileTaskRunner, which
173 // iterates over all backends?
170 FileSystemType fs_type = QuotaStorageTypeToFileSystemType(type); 174 FileSystemType fs_type = QuotaStorageTypeToFileSystemType(type);
171 DCHECK(fs_type != kFileSystemTypeUnknown); 175 DCHECK(fs_type != kFileSystemTypeUnknown);
172 176 LOG(ERROR) << "deleting filesystem entry: " << origin.spec();
173 base::PostTaskAndReplyWithResult( 177 base::PostTaskAndReplyWithResult(
174 file_task_runner(), FROM_HERE, 178 file_task_runner(), FROM_HERE,
175 base::Bind(&DeleteOriginOnFileTaskRunner, 179 base::Bind(&DeleteOriginOnFileTaskRunner,
176 base::RetainedRef(file_system_context_), origin, fs_type), 180 base::RetainedRef(file_system_context_), origin, fs_type),
177 callback); 181 callback);
178 } 182 }
179 183
180 bool FileSystemQuotaClient::DoesSupport( 184 bool FileSystemQuotaClient::DoesSupport(
181 storage::StorageType storage_type) const { 185 storage::StorageType storage_type) const {
182 FileSystemType type = QuotaStorageTypeToFileSystemType(storage_type); 186 FileSystemType type = QuotaStorageTypeToFileSystemType(storage_type);
183 DCHECK(type != kFileSystemTypeUnknown); 187 DCHECK(type != kFileSystemTypeUnknown);
184 return file_system_context_->IsSandboxFileSystem(type); 188 return file_system_context_->IsSandboxFileSystem(type);
185 } 189 }
186 190
187 base::SequencedTaskRunner* FileSystemQuotaClient::file_task_runner() const { 191 base::SequencedTaskRunner* FileSystemQuotaClient::file_task_runner() const {
188 return file_system_context_->default_file_task_runner(); 192 return file_system_context_->default_file_task_runner();
189 } 193 }
190 194
191 } // namespace storage 195 } // namespace storage
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698