| 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 <errno.h> | 5 #include <errno.h> |
| 6 #include <fcntl.h> | 6 #include <fcntl.h> |
| 7 #include <pthread.h> | 7 #include <pthread.h> |
| 8 #include <sys/stat.h> | 8 #include <sys/stat.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 public: | 25 public: |
| 26 explicit NodeForTesting(Filesystem* fs) : Node(fs) {} | 26 explicit NodeForTesting(Filesystem* fs) : Node(fs) {} |
| 27 }; | 27 }; |
| 28 | 28 |
| 29 class FilesystemForTesting : public Filesystem { | 29 class FilesystemForTesting : public Filesystem { |
| 30 public: | 30 public: |
| 31 FilesystemForTesting() {} | 31 FilesystemForTesting() {} |
| 32 | 32 |
| 33 public: | 33 public: |
| 34 Error Access(const Path& path, int a_mode) { return ENOSYS; } | 34 Error Access(const Path& path, int a_mode) { return ENOSYS; } |
| 35 Error Open(const Path& path, int mode, ScopedNode* out_node) { | 35 Error OpenWithMode(const Path& path, int open_flags, |
| 36 mode_t mode, ScopedNode* out_node) { |
| 36 out_node->reset(NULL); | 37 out_node->reset(NULL); |
| 37 return ENOSYS; | 38 return ENOSYS; |
| 38 } | 39 } |
| 39 Error Unlink(const Path& path) { return 0; } | 40 Error Unlink(const Path& path) { return 0; } |
| 40 Error Mkdir(const Path& path, int permissions) { return 0; } | 41 Error Mkdir(const Path& path, int permissions) { return 0; } |
| 41 Error Rmdir(const Path& path) { return 0; } | 42 Error Rmdir(const Path& path) { return 0; } |
| 42 Error Remove(const Path& path) { return 0; } | 43 Error Remove(const Path& path) { return 0; } |
| 43 Error Rename(const Path& path, const Path& newpath) { return 0; } | 44 Error Rename(const Path& path, const Path& newpath) { return 0; } |
| 44 }; | 45 }; |
| 45 | 46 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 EXPECT_EQ(3, raw_handle->RefCount()); | 177 EXPECT_EQ(3, raw_handle->RefCount()); |
| 177 | 178 |
| 178 | 179 |
| 179 handle.reset(); | 180 handle.reset(); |
| 180 EXPECT_EQ(2, raw_handle->RefCount()); | 181 EXPECT_EQ(2, raw_handle->RefCount()); |
| 181 | 182 |
| 182 proxy.AcquireHandle(5, &handle); | 183 proxy.AcquireHandle(5, &handle); |
| 183 EXPECT_EQ(3, raw_handle->RefCount()); | 184 EXPECT_EQ(3, raw_handle->RefCount()); |
| 184 EXPECT_EQ(raw_handle, handle.get()); | 185 EXPECT_EQ(raw_handle, handle.get()); |
| 185 } | 186 } |
| OLD | NEW |