OLD | NEW |
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 "webkit/blob/shareable_file_reference.h" | 5 #include "webkit/blob/shareable_file_reference.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/file_util_proxy.h" | 10 #include "base/file_util_proxy.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 } | 110 } |
111 | 111 |
112 ShareableFileReference::~ShareableFileReference() { | 112 ShareableFileReference::~ShareableFileReference() { |
113 DCHECK(g_file_map.Get().Find(path_)->second == this); | 113 DCHECK(g_file_map.Get().Find(path_)->second == this); |
114 g_file_map.Get().Erase(path_); | 114 g_file_map.Get().Erase(path_); |
115 | 115 |
116 for (size_t i = 0; i < final_release_callbacks_.size(); i++) | 116 for (size_t i = 0; i < final_release_callbacks_.size(); i++) |
117 final_release_callbacks_[i].Run(path_); | 117 final_release_callbacks_[i].Run(path_); |
118 | 118 |
119 if (final_release_policy_ == DELETE_ON_FINAL_RELEASE) { | 119 if (final_release_policy_ == DELETE_ON_FINAL_RELEASE) { |
120 base::FileUtilProxy::Delete(file_task_runner_, path_, false /* recursive */, | 120 base::FileUtilProxy::Delete( |
121 base::FileUtilProxy::StatusCallback()); | 121 file_task_runner_.get(), path_, false /* recursive */, |
| 122 base::FileUtilProxy::StatusCallback()); |
122 } | 123 } |
123 } | 124 } |
124 | 125 |
125 } // namespace webkit_blob | 126 } // namespace webkit_blob |
OLD | NEW |