OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/blob/deletable_file_reference.h" | 5 #include "webkit/blob/deletable_file_reference.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/file_util_proxy.h" | 9 #include "base/file_util_proxy.h" |
10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 DeletableFileReference::DeletableFileReference( | 51 DeletableFileReference::DeletableFileReference( |
52 const FilePath& path, base::MessageLoopProxy* file_thread) | 52 const FilePath& path, base::MessageLoopProxy* file_thread) |
53 : path_(path), file_thread_(file_thread) { | 53 : path_(path), file_thread_(file_thread) { |
54 DCHECK(map()->find(path_)->second == NULL); | 54 DCHECK(map()->find(path_)->second == NULL); |
55 } | 55 } |
56 | 56 |
57 DeletableFileReference::~DeletableFileReference() { | 57 DeletableFileReference::~DeletableFileReference() { |
58 DCHECK(map()->find(path_)->second == this); | 58 DCHECK(map()->find(path_)->second == this); |
59 map()->erase(path_); | 59 map()->erase(path_); |
60 base::FileUtilProxy::Delete(file_thread_, path_, NULL); | 60 base::FileUtilProxy::Delete(file_thread_, path_, false /* recursive */, NULL); |
61 } | 61 } |
62 | 62 |
63 } // namespace webkit_blob | 63 } // namespace webkit_blob |
OLD | NEW |