1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ipc/chromium/src/base/dir_reader_fallback.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,31 @@ 1.4 +// Copyright (c) 2010 The Chromium Authors. All rights reserved. 1.5 +// Use of this source code is governed by a BSD-style license that can be 1.6 +// found in the LICENSE file. 1.7 + 1.8 +#ifndef BASE_DIR_READER_FALLBACK_H_ 1.9 +#define BASE_DIR_READER_FALLBACK_H_ 1.10 +#pragma once 1.11 + 1.12 +namespace base { 1.13 + 1.14 +class DirReaderFallback { 1.15 + public: 1.16 + // Open a directory. If |IsValid| is true, then |Next| can be called to start 1.17 + // the iteration at the beginning of the directory. 1.18 + explicit DirReaderFallback(const char* directory_path) { } 1.19 + // After construction, IsValid returns true iff the directory was 1.20 + // successfully opened. 1.21 + bool IsValid() const { return false; } 1.22 + // Move to the next entry returning false if the iteration is complete. 1.23 + bool Next() { return false; } 1.24 + // Return the name of the current directory entry. 1.25 + const char* name() { return 0;} 1.26 + // Return the file descriptor which is being used. 1.27 + int fd() const { return -1; } 1.28 + // Returns true if this is a no-op fallback class (for testing). 1.29 + static bool IsFallback() { return true; } 1.30 +}; 1.31 + 1.32 +} // namespace base 1.33 + 1.34 +#endif // BASE_DIR_READER_FALLBACK_H_