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

Side by Side Diff: webkit/blob/deletable_file_reference.cc

Issue 6286038: Add initial code to do filename munging in the FileSystem.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698