OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef REMOTING_HOST_COMPOSITE_HOST_CONFIG_H_ |
| 6 #define REMOTING_HOST_COMPOSITE_HOST_CONFIG_H_ |
| 7 |
| 8 #include "remoting/host/host_config.h" |
| 9 |
| 10 #include "base/compiler_specific.h" |
| 11 #include "base/memory/scoped_vector.h" |
| 12 |
| 13 class FilePath; |
| 14 |
| 15 namespace remoting { |
| 16 |
| 17 // CompositeConfig reads multiple configuration files and merges them together. |
| 18 class CompositeHostConfig : public HostConfig { |
| 19 public: |
| 20 CompositeHostConfig(); |
| 21 virtual ~CompositeHostConfig(); |
| 22 |
| 23 // Add configuration file specified stored at |path|. Returns false if the |
| 24 // file with the specified name doesn't exist or can't be opened. When the |
| 25 // same parameter is present in more than one file priority is given to those |
| 26 // that are added first. |
| 27 bool AddConfigPath(const FilePath& path); |
| 28 |
| 29 // HostConfig interface. |
| 30 virtual bool GetString(const std::string& path, |
| 31 std::string* out_value) const OVERRIDE; |
| 32 virtual bool GetBoolean(const std::string& path, |
| 33 bool* out_value) const OVERRIDE; |
| 34 |
| 35 private: |
| 36 ScopedVector<HostConfig> configs_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(CompositeHostConfig); |
| 39 }; |
| 40 |
| 41 } // namespace remoting |
| 42 |
| 43 #endif // REMOTING_HOST_COMPOSITE_HOST_CONFIG_H_ |
OLD | NEW |