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

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

Issue 579083004: FileSystem: Modify ObfucatedFileUtil to delete contents of the plugin private filesystem (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: address xhwang@'s comment Created 6 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/plugin_private_file_system_backend.h" 5 #include "storage/browser/fileapi/plugin_private_file_system_backend.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 } 216 }
217 217
218 base::File::Error 218 base::File::Error
219 PluginPrivateFileSystemBackend::DeleteOriginDataOnFileTaskRunner( 219 PluginPrivateFileSystemBackend::DeleteOriginDataOnFileTaskRunner(
220 FileSystemContext* context, 220 FileSystemContext* context,
221 storage::QuotaManagerProxy* proxy, 221 storage::QuotaManagerProxy* proxy,
222 const GURL& origin_url, 222 const GURL& origin_url,
223 FileSystemType type) { 223 FileSystemType type) {
224 if (!CanHandleType(type)) 224 if (!CanHandleType(type))
225 return base::File::FILE_ERROR_SECURITY; 225 return base::File::FILE_ERROR_SECURITY;
226 bool result = obfuscated_file_util()->DeleteDirectoryForOriginAndType( 226 bool result = obfuscated_file_util()->
227 origin_url, std::string()); 227 DeleteOriginDirectoryForPluginPrivateFileSystem(origin_url);
228 if (result) 228 if (result)
229 return base::File::FILE_OK; 229 return base::File::FILE_OK;
230 return base::File::FILE_ERROR_FAILED; 230 return base::File::FILE_ERROR_FAILED;
231 } 231 }
232 232
233 void PluginPrivateFileSystemBackend::GetOriginsForTypeOnFileTaskRunner( 233 void PluginPrivateFileSystemBackend::GetOriginsForTypeOnFileTaskRunner(
234 FileSystemType type, 234 FileSystemType type,
235 std::set<GURL>* origins) { 235 std::set<GURL>* origins) {
236 if (!CanHandleType(type)) 236 if (!CanHandleType(type))
237 return; 237 return;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 FileSystemType type) const { 288 FileSystemType type) const {
289 return NULL; 289 return NULL;
290 } 290 }
291 291
292 ObfuscatedFileUtil* PluginPrivateFileSystemBackend::obfuscated_file_util() { 292 ObfuscatedFileUtil* PluginPrivateFileSystemBackend::obfuscated_file_util() {
293 return static_cast<ObfuscatedFileUtil*>( 293 return static_cast<ObfuscatedFileUtil*>(
294 static_cast<AsyncFileUtilAdapter*>(file_util_.get())->sync_file_util()); 294 static_cast<AsyncFileUtilAdapter*>(file_util_.get())->sync_file_util());
295 } 295 }
296 296
297 } // namespace storage 297 } // namespace storage
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698