Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
michael@0 | 2 | // Use of this source code is governed by a BSD-style license that can be |
michael@0 | 3 | // found in the LICENSE file. |
michael@0 | 4 | |
michael@0 | 5 | #ifndef BASE_DIR_READER_FALLBACK_H_ |
michael@0 | 6 | #define BASE_DIR_READER_FALLBACK_H_ |
michael@0 | 7 | #pragma once |
michael@0 | 8 | |
michael@0 | 9 | namespace base { |
michael@0 | 10 | |
michael@0 | 11 | class DirReaderFallback { |
michael@0 | 12 | public: |
michael@0 | 13 | // Open a directory. If |IsValid| is true, then |Next| can be called to start |
michael@0 | 14 | // the iteration at the beginning of the directory. |
michael@0 | 15 | explicit DirReaderFallback(const char* directory_path) { } |
michael@0 | 16 | // After construction, IsValid returns true iff the directory was |
michael@0 | 17 | // successfully opened. |
michael@0 | 18 | bool IsValid() const { return false; } |
michael@0 | 19 | // Move to the next entry returning false if the iteration is complete. |
michael@0 | 20 | bool Next() { return false; } |
michael@0 | 21 | // Return the name of the current directory entry. |
michael@0 | 22 | const char* name() { return 0;} |
michael@0 | 23 | // Return the file descriptor which is being used. |
michael@0 | 24 | int fd() const { return -1; } |
michael@0 | 25 | // Returns true if this is a no-op fallback class (for testing). |
michael@0 | 26 | static bool IsFallback() { return true; } |
michael@0 | 27 | }; |
michael@0 | 28 | |
michael@0 | 29 | } // namespace base |
michael@0 | 30 | |
michael@0 | 31 | #endif // BASE_DIR_READER_FALLBACK_H_ |