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

Side by Side Diff: webkit/common/blob/scoped_file.h

Issue 515093002: FileAPI/sync file system cleanups for scoped_refptr operator T* cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #ifndef WEBKIT_COMMON_BLOB_SCOPED_FILE_H_ 5 #ifndef WEBKIT_COMMON_BLOB_SCOPED_FILE_H_
6 #define WEBKIT_COMMON_BLOB_SCOPED_FILE_H_ 6 #define WEBKIT_COMMON_BLOB_SCOPED_FILE_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 DELETE_ON_SCOPE_OUT, 42 DELETE_ON_SCOPE_OUT,
43 DONT_DELETE_ON_SCOPE_OUT, 43 DONT_DELETE_ON_SCOPE_OUT,
44 }; 44 };
45 45
46 ScopedFile(); 46 ScopedFile();
47 47
48 // |file_task_runner| is used to schedule a file deletion if |policy| 48 // |file_task_runner| is used to schedule a file deletion if |policy|
49 // is DELETE_ON_SCOPE_OUT. 49 // is DELETE_ON_SCOPE_OUT.
50 ScopedFile(const base::FilePath& path, 50 ScopedFile(const base::FilePath& path,
51 ScopeOutPolicy policy, 51 ScopeOutPolicy policy,
52 base::TaskRunner* file_task_runner); 52 const scoped_refptr<base::TaskRunner>& file_task_runner);
53 53
54 // Move constructor and operator. The data of r-value will be transfered 54 // Move constructor and operator. The data of r-value will be transfered
55 // in a destructive way. (See base/move.h) 55 // in a destructive way. (See base/move.h)
56 ScopedFile(RValue other); 56 ScopedFile(RValue other);
57 ScopedFile& operator=(RValue rhs) { 57 ScopedFile& operator=(RValue rhs) {
58 MoveFrom(*rhs.object); 58 MoveFrom(*rhs.object);
59 return *this; 59 return *this;
60 } 60 }
61 61
62 ~ScopedFile(); 62 ~ScopedFile();
(...skipping 22 matching lines...) Expand all
85 85
86 base::FilePath path_; 86 base::FilePath path_;
87 ScopeOutPolicy scope_out_policy_; 87 ScopeOutPolicy scope_out_policy_;
88 scoped_refptr<base::TaskRunner> file_task_runner_; 88 scoped_refptr<base::TaskRunner> file_task_runner_;
89 ScopeOutCallbackList scope_out_callbacks_; 89 ScopeOutCallbackList scope_out_callbacks_;
90 }; 90 };
91 91
92 } // namespace storage 92 } // namespace storage
93 93
94 #endif // WEBKIT_COMMON_BLOB_SCOPED_FILE_H_ 94 #endif // WEBKIT_COMMON_BLOB_SCOPED_FILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698