| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 | 143 |
| 144 for (; i_files != all_files_.end(); i_files++) { | 144 for (; i_files != all_files_.end(); i_files++) { |
| 145 if (i_files->first.compare(path) == 0) { | 145 if (i_files->first.compare(path) == 0) { |
| 146 return new FakeFileStream(i_files->second); | 146 return new FakeFileStream(i_files->second); |
| 147 } | 147 } |
| 148 } | 148 } |
| 149 | 149 |
| 150 return NULL; | 150 return NULL; |
| 151 } | 151 } |
| 152 | 152 |
| 153 bool CreatePrivateFile(const Pathname &filename) { | |
| 154 EXPECT_TRUE(false) << "Unsupported operation"; | |
| 155 return false; | |
| 156 } | |
| 157 bool DeleteFile(const Pathname &filename) { | 153 bool DeleteFile(const Pathname &filename) { |
| 158 EXPECT_TRUE(false) << "Unsupported operation"; | 154 EXPECT_TRUE(false) << "Unsupported operation"; |
| 159 return false; | 155 return false; |
| 160 } | 156 } |
| 161 bool DeleteEmptyFolder(const Pathname &folder) { | 157 bool DeleteEmptyFolder(const Pathname &folder) { |
| 162 EXPECT_TRUE(false) << "Unsupported operation"; | 158 EXPECT_TRUE(false) << "Unsupported operation"; |
| 163 return false; | 159 return false; |
| 164 } | 160 } |
| 165 bool DeleteFolderContents(const Pathname &folder) { | 161 bool DeleteFolderContents(const Pathname &folder) { |
| 166 EXPECT_TRUE(false) << "Unsupported operation"; | 162 EXPECT_TRUE(false) << "Unsupported operation"; |
| 167 return false; | 163 return false; |
| 168 } | 164 } |
| 169 bool DeleteFolderAndContents(const Pathname &folder) { | 165 bool DeleteFolderAndContents(const Pathname &folder) { |
| 170 EXPECT_TRUE(false) << "Unsupported operation"; | 166 EXPECT_TRUE(false) << "Unsupported operation"; |
| 171 return false; | 167 return false; |
| 172 } | 168 } |
| 173 bool CreateFolder(const Pathname &pathname) { | 169 bool CreateFolder(const Pathname &pathname) { |
| 174 EXPECT_TRUE(false) << "Unsupported operation"; | 170 EXPECT_TRUE(false) << "Unsupported operation"; |
| 175 return false; | 171 return false; |
| 176 } | 172 } |
| 177 bool MoveFolder(const Pathname &old_path, const Pathname &new_path) { | |
| 178 EXPECT_TRUE(false) << "Unsupported operation"; | |
| 179 return false; | |
| 180 } | |
| 181 bool MoveFile(const Pathname &old_path, const Pathname &new_path) { | 173 bool MoveFile(const Pathname &old_path, const Pathname &new_path) { |
| 182 EXPECT_TRUE(false) << "Unsupported operation"; | 174 EXPECT_TRUE(false) << "Unsupported operation"; |
| 183 return false; | 175 return false; |
| 184 } | 176 } |
| 185 bool CopyFile(const Pathname &old_path, const Pathname &new_path) { | 177 bool CopyFile(const Pathname &old_path, const Pathname &new_path) { |
| 186 EXPECT_TRUE(false) << "Unsupported operation"; | 178 EXPECT_TRUE(false) << "Unsupported operation"; |
| 187 return false; | 179 return false; |
| 188 } | 180 } |
| 189 bool IsFolder(const Pathname &pathname) { | 181 bool IsFolder(const Pathname &pathname) { |
| 190 EXPECT_TRUE(false) << "Unsupported operation"; | 182 EXPECT_TRUE(false) << "Unsupported operation"; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 213 } | 205 } |
| 214 bool GetFileSize(const Pathname &path, size_t *size) { | 206 bool GetFileSize(const Pathname &path, size_t *size) { |
| 215 EXPECT_TRUE(false) << "Unsupported operation"; | 207 EXPECT_TRUE(false) << "Unsupported operation"; |
| 216 return false; | 208 return false; |
| 217 } | 209 } |
| 218 bool GetFileTime(const Pathname &path, FileTimeType which, | 210 bool GetFileTime(const Pathname &path, FileTimeType which, |
| 219 time_t* time) { | 211 time_t* time) { |
| 220 EXPECT_TRUE(false) << "Unsupported operation"; | 212 EXPECT_TRUE(false) << "Unsupported operation"; |
| 221 return false; | 213 return false; |
| 222 } | 214 } |
| 223 bool GetAppPathname(Pathname *path) { | |
| 224 EXPECT_TRUE(false) << "Unsupported operation"; | |
| 225 return false; | |
| 226 } | |
| 227 bool GetAppDataFolder(Pathname *path, bool per_user) { | 215 bool GetAppDataFolder(Pathname *path, bool per_user) { |
| 228 EXPECT_TRUE(per_user) << "Unsupported operation"; | 216 EXPECT_TRUE(per_user) << "Unsupported operation"; |
| 229 #if defined(WEBRTC_WIN) | 217 #if defined(WEBRTC_WIN) |
| 230 path->SetPathname("c:\\Users\\test_user", ""); | 218 path->SetPathname("c:\\Users\\test_user", ""); |
| 231 #else | 219 #else |
| 232 path->SetPathname("/home/user/test_user", ""); | 220 path->SetPathname("/home/user/test_user", ""); |
| 233 #endif | 221 #endif |
| 234 return true; | 222 return true; |
| 235 } | 223 } |
| 236 bool GetAppTempFolder(Pathname *path) { | 224 bool GetAppTempFolder(Pathname *path) { |
| 237 EXPECT_TRUE(false) << "Unsupported operation"; | 225 EXPECT_TRUE(false) << "Unsupported operation"; |
| 238 return false; | 226 return false; |
| 239 } | 227 } |
| 240 bool GetDiskFreeSpace(const Pathname& path, int64_t* freebytes) { | 228 bool GetDiskFreeSpace(const Pathname& path, int64_t* freebytes) { |
| 241 EXPECT_TRUE(false) << "Unsupported operation"; | 229 EXPECT_TRUE(false) << "Unsupported operation"; |
| 242 return false; | 230 return false; |
| 243 } | 231 } |
| 244 Pathname GetCurrentDirectory() { | |
| 245 return Pathname(); | |
| 246 } | |
| 247 | 232 |
| 248 private: | 233 private: |
| 249 const std::vector<File> all_files_; | 234 const std::vector<File> all_files_; |
| 250 }; | 235 }; |
| 251 } // namespace rtc | 236 } // namespace rtc |
| 252 | 237 |
| 253 #endif // WEBRTC_BASE_FILEUTILS_MOCK_H_ | 238 #endif // WEBRTC_BASE_FILEUTILS_MOCK_H_ |
| OLD | NEW |