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

Side by Side Diff: storage/browser/fileapi/file_system_context.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_context.h" 5 #include "storage/browser/fileapi/file_system_context.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 if (external_mount_points) 209 if (external_mount_points)
210 url_crackers_.push_back(external_mount_points); 210 url_crackers_.push_back(external_mount_points);
211 url_crackers_.push_back(ExternalMountPoints::GetSystemInstance()); 211 url_crackers_.push_back(ExternalMountPoints::GetSystemInstance());
212 url_crackers_.push_back(IsolatedContext::GetInstance()); 212 url_crackers_.push_back(IsolatedContext::GetInstance());
213 } 213 }
214 214
215 bool FileSystemContext::DeleteDataForOriginOnFileTaskRunner( 215 bool FileSystemContext::DeleteDataForOriginOnFileTaskRunner(
216 const GURL& origin_url) { 216 const GURL& origin_url) {
217 DCHECK(default_file_task_runner()->RunsTasksOnCurrentThread()); 217 DCHECK(default_file_task_runner()->RunsTasksOnCurrentThread());
218 DCHECK(origin_url == origin_url.GetOrigin()); 218 DCHECK(origin_url == origin_url.GetOrigin());
219 219 LOG(ERROR) << origin_url.spec();
220 bool success = true; 220 bool success = true;
221 for (FileSystemBackendMap::iterator iter = backend_map_.begin(); 221 for (FileSystemBackendMap::iterator iter = backend_map_.begin();
222 iter != backend_map_.end(); 222 iter != backend_map_.end();
223 ++iter) { 223 ++iter) {
224 FileSystemBackend* backend = iter->second; 224 FileSystemBackend* backend = iter->second;
225 if (!backend->GetQuotaUtil()) 225 if (!backend->GetQuotaUtil())
226 continue; 226 continue;
227 LOG(ERROR) << "fs type: " << iter->first;
227 if (backend->GetQuotaUtil()->DeleteOriginDataOnFileTaskRunner( 228 if (backend->GetQuotaUtil()->DeleteOriginDataOnFileTaskRunner(
228 this, quota_manager_proxy(), origin_url, iter->first) 229 this, quota_manager_proxy(), origin_url, iter->first)
229 != base::File::FILE_OK) { 230 != base::File::FILE_OK) {
230 // Continue the loop, but record the failure. 231 // Continue the loop, but record the failure.
231 success = false; 232 success = false;
232 } 233 }
233 } 234 }
234 235
235 return success; 236 return success;
236 } 237 }
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 634
634 // TODO(mtomasz): Not all fields should be required for ResolveURL. 635 // TODO(mtomasz): Not all fields should be required for ResolveURL.
635 operation_runner()->GetMetadata( 636 operation_runner()->GetMetadata(
636 url, FileSystemOperation::GET_METADATA_FIELD_IS_DIRECTORY | 637 url, FileSystemOperation::GET_METADATA_FIELD_IS_DIRECTORY |
637 FileSystemOperation::GET_METADATA_FIELD_SIZE | 638 FileSystemOperation::GET_METADATA_FIELD_SIZE |
638 FileSystemOperation::GET_METADATA_FIELD_LAST_MODIFIED, 639 FileSystemOperation::GET_METADATA_FIELD_LAST_MODIFIED,
639 base::Bind(&DidGetMetadataForResolveURL, path, callback, info)); 640 base::Bind(&DidGetMetadataForResolveURL, path, callback, info));
640 } 641 }
641 642
642 } // namespace storage 643 } // namespace storage
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698