Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(501)

Side by Side Diff: remoting/host/composite_host_config.h

Issue 10831184: Fix Me2Me host to properly reload config when it changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_HOST_COMPOSITE_HOST_CONFIG_H_ 5 #ifndef REMOTING_HOST_COMPOSITE_HOST_CONFIG_H_
6 #define REMOTING_HOST_COMPOSITE_HOST_CONFIG_H_ 6 #define REMOTING_HOST_COMPOSITE_HOST_CONFIG_H_
7 7
8 #include "remoting/host/host_config.h" 8 #include "remoting/host/host_config.h"
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/scoped_vector.h" 11 #include "base/memory/scoped_vector.h"
12 12
13 class FilePath; 13 class FilePath;
14 14
15 namespace remoting { 15 namespace remoting {
16 16
17 class JsonHostConfig;
18
17 // CompositeConfig reads multiple configuration files and merges them together. 19 // CompositeConfig reads multiple configuration files and merges them together.
18 class CompositeHostConfig : public HostConfig { 20 class CompositeHostConfig : public HostConfig {
19 public: 21 public:
20 CompositeHostConfig(); 22 CompositeHostConfig();
21 virtual ~CompositeHostConfig(); 23 virtual ~CompositeHostConfig();
22 24
23 // Add configuration file specified stored at |path|. Returns false if the 25 // 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 26 // 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 27 // same parameter is present in more than one file priority is given to those
26 // that are added first. 28 // that are added first.
27 bool AddConfigPath(const FilePath& path); 29 bool AddConfigPath(const FilePath& path);
28 30
31 // Reloads all configuration files. Returns false if it fails to load one
simonmorris 2012/08/07 00:43:35 one -> any
Sergey Ulanov 2012/08/07 00:57:03 Done.
32 // of the files.
33 bool Reload();
34
29 // HostConfig interface. 35 // HostConfig interface.
30 virtual bool GetString(const std::string& path, 36 virtual bool GetString(const std::string& path,
31 std::string* out_value) const OVERRIDE; 37 std::string* out_value) const OVERRIDE;
32 virtual bool GetBoolean(const std::string& path, 38 virtual bool GetBoolean(const std::string& path,
33 bool* out_value) const OVERRIDE; 39 bool* out_value) const OVERRIDE;
34 40
35 private: 41 private:
36 ScopedVector<HostConfig> configs_; 42 ScopedVector<JsonHostConfig> configs_;
37 43
38 DISALLOW_COPY_AND_ASSIGN(CompositeHostConfig); 44 DISALLOW_COPY_AND_ASSIGN(CompositeHostConfig);
39 }; 45 };
40 46
41 } // namespace remoting 47 } // namespace remoting
42 48
43 #endif // REMOTING_HOST_COMPOSITE_HOST_CONFIG_H_ 49 #endif // REMOTING_HOST_COMPOSITE_HOST_CONFIG_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/composite_host_config.cc » ('j') | remoting/host/remoting_me2me_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698