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

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

Issue 7057032: Integrated obfuscation with quota; all unit tests now pass (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Eliminated a vector copy Created 9 years, 7 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
« no previous file with comments | « no previous file | webkit/fileapi/file_system_origin_database.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_context.h" 5 #include "webkit/fileapi/file_system_context.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/message_loop_proxy.h" 8 #include "base/message_loop_proxy.h"
9 #include "googleurl/src/gurl.h" 9 #include "googleurl/src/gurl.h"
10 #include "webkit/fileapi/file_system_path_manager.h" 10 #include "webkit/fileapi/file_system_path_manager.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 DCHECK(sandbox_provider()); 73 DCHECK(sandbox_provider());
74 74
75 // Delete temporary and persistent data. 75 // Delete temporary and persistent data.
76 sandbox_provider()->DeleteOriginDataOnFileThread( 76 sandbox_provider()->DeleteOriginDataOnFileThread(
77 quota_manager_proxy(), origin_url, kFileSystemTypeTemporary); 77 quota_manager_proxy(), origin_url, kFileSystemTypeTemporary);
78 sandbox_provider()->DeleteOriginDataOnFileThread( 78 sandbox_provider()->DeleteOriginDataOnFileThread(
79 quota_manager_proxy(), origin_url, kFileSystemTypePersistent); 79 quota_manager_proxy(), origin_url, kFileSystemTypePersistent);
80 80
81 // Delete the upper level directory. 81 // Delete the upper level directory.
82 FilePath path_for_origin = 82 FilePath path_for_origin =
83 sandbox_provider()->GetBaseDirectoryForOrigin(origin_url); 83 sandbox_provider()->GetBaseDirectoryForOrigin(origin_url, false);
84 if (!file_util::PathExists(path_for_origin)) 84 if (!file_util::PathExists(path_for_origin))
85 return true; 85 return true;
86 return file_util::Delete(path_for_origin, true /* recursive */); 86 return file_util::Delete(path_for_origin, true /* recursive */);
87 } 87 }
88 88
89 bool FileSystemContext::DeleteDataForOriginAndTypeOnFileThread( 89 bool FileSystemContext::DeleteDataForOriginAndTypeOnFileThread(
90 const GURL& origin_url, FileSystemType type) { 90 const GURL& origin_url, FileSystemType type) {
91 DCHECK(file_message_loop_->BelongsToCurrentThread()); 91 DCHECK(file_message_loop_->BelongsToCurrentThread());
92 if (type == fileapi::kFileSystemTypeTemporary || 92 if (type == fileapi::kFileSystemTypeTemporary ||
93 type == fileapi::kFileSystemTypePersistent) { 93 type == fileapi::kFileSystemTypePersistent) {
(...skipping 20 matching lines...) Expand all
114 return; 114 return;
115 } 115 }
116 delete this; 116 delete this;
117 } 117 }
118 118
119 SandboxMountPointProvider* FileSystemContext::sandbox_provider() const { 119 SandboxMountPointProvider* FileSystemContext::sandbox_provider() const {
120 return path_manager_->sandbox_provider(); 120 return path_manager_->sandbox_provider();
121 } 121 }
122 122
123 } // namespace fileapi 123 } // namespace fileapi
OLDNEW
« no previous file with comments | « no previous file | webkit/fileapi/file_system_origin_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698