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 "base/files/file_util_proxy.h" | 5 #include "base/files/file_util_proxy.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 24 matching lines...) Expand all Loading... | |
35 const File::Info& file_info) { | 35 const File::Info& file_info) { |
36 error_ = error; | 36 error_ = error; |
37 file_info_ = file_info; | 37 file_info_ = file_info; |
38 MessageLoop::current()->QuitWhenIdle(); | 38 MessageLoop::current()->QuitWhenIdle(); |
39 } | 39 } |
40 | 40 |
41 protected: | 41 protected: |
42 TaskRunner* file_task_runner() const { | 42 TaskRunner* file_task_runner() const { |
43 return file_thread_.task_runner().get(); | 43 return file_thread_.task_runner().get(); |
44 } | 44 } |
45 const FilePath& test_dir_path() const { return dir_.path(); } | 45 const FilePath& test_dir_path() const { return dir_.GetPath(); } |
danakj
2016/09/07 20:47:18
dittos
vabr (Chromium)
2016/09/08 07:45:35
test_path -- done
test_dir_path -- not used anywhe
| |
46 const FilePath test_path() const { return dir_.path().AppendASCII("test"); } | 46 const FilePath test_path() const { |
47 return dir_.GetPath().AppendASCII("test"); | |
48 } | |
47 | 49 |
48 MessageLoopForIO message_loop_; | 50 MessageLoopForIO message_loop_; |
49 Thread file_thread_; | 51 Thread file_thread_; |
50 | 52 |
51 ScopedTempDir dir_; | 53 ScopedTempDir dir_; |
52 File::Error error_; | 54 File::Error error_; |
53 FilePath path_; | 55 FilePath path_; |
54 File::Info file_info_; | 56 File::Info file_info_; |
55 std::vector<char> buffer_; | 57 std::vector<char> buffer_; |
56 WeakPtrFactory<FileUtilProxyTest> weak_factory_; | 58 WeakPtrFactory<FileUtilProxyTest> weak_factory_; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
122 | 124 |
123 // The returned values may only have the seconds precision, so we cast | 125 // The returned values may only have the seconds precision, so we cast |
124 // the double values to int here. | 126 // the double values to int here. |
125 EXPECT_EQ(static_cast<int>(last_modified_time.ToDoubleT()), | 127 EXPECT_EQ(static_cast<int>(last_modified_time.ToDoubleT()), |
126 static_cast<int>(info.last_modified.ToDoubleT())); | 128 static_cast<int>(info.last_modified.ToDoubleT())); |
127 EXPECT_EQ(static_cast<int>(last_accessed_time.ToDoubleT()), | 129 EXPECT_EQ(static_cast<int>(last_accessed_time.ToDoubleT()), |
128 static_cast<int>(info.last_accessed.ToDoubleT())); | 130 static_cast<int>(info.last_accessed.ToDoubleT())); |
129 } | 131 } |
130 | 132 |
131 } // namespace base | 133 } // namespace base |
OLD | NEW |