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