| 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/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 DeletableFileReference::DeletableFileReference( | 49 DeletableFileReference::DeletableFileReference( |
| 50 const FilePath& path, base::MessageLoopProxy* file_thread) | 50 const FilePath& path, base::MessageLoopProxy* file_thread) |
| 51 : path_(path), file_thread_(file_thread) { | 51 : path_(path), file_thread_(file_thread) { |
| 52 DCHECK(g_deletable_file_map.Get().find(path_)->second == NULL); | 52 DCHECK(g_deletable_file_map.Get().find(path_)->second == NULL); |
| 53 } | 53 } |
| 54 | 54 |
| 55 DeletableFileReference::~DeletableFileReference() { | 55 DeletableFileReference::~DeletableFileReference() { |
| 56 DCHECK(g_deletable_file_map.Get().find(path_)->second == this); | 56 DCHECK(g_deletable_file_map.Get().find(path_)->second == this); |
| 57 g_deletable_file_map.Get().erase(path_); | 57 g_deletable_file_map.Get().erase(path_); |
| 58 base::FileUtilProxy::Delete(file_thread_, path_, false /* recursive */, NULL); | 58 base::FileUtilProxy::GetInstance()->Delete( |
| 59 file_thread_, path_, false /* recursive */, NULL); |
| 59 } | 60 } |
| 60 | 61 |
| 61 } // namespace webkit_blob | 62 } // namespace webkit_blob |
| OLD | NEW |