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

Unified Diff: remoting/host/composite_host_config.h

Issue 10825121: Remove the need to have separate config for authentication. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/host/composite_host_config.cc » ('j') | remoting/host/remoting_me2me_host.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/composite_host_config.h
diff --git a/remoting/host/composite_host_config.h b/remoting/host/composite_host_config.h
new file mode 100644
index 0000000000000000000000000000000000000000..03773aad25cd2134298f16b4a9b62d647f0d71af
--- /dev/null
+++ b/remoting/host/composite_host_config.h
@@ -0,0 +1,44 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_HOST_COMPOSITE_HOST_CONFIG_H_
+#define REMOTING_HOST_COMPOSITE_HOST_CONFIG_H_
+
+#include "remoting/host/host_config.h"
+
+#include <vector>
+
+#include "base/compiler_specific.h"
+
+class FilePath;
+
+namespace remoting {
+
+// CompositeConfig reads multiple configuration files and merges them together.
+class CompositeHostConfig : public HostConfig {
+ public:
+ CompositeHostConfig();
+ virtual ~CompositeHostConfig();
+
+ // Add configuration file specified stored at |path|. Returns false if the
+ // file with the specified name doesn't exist or can't be opened. When the
+ // same parameter is present in more than one file priority is given to those
+ // that are added first.
+ bool AddConfigPath(const FilePath& path);
+
+ // HostConfig interface.
+ virtual bool GetString(const std::string& path,
+ std::string* out_value) const OVERRIDE;
+ virtual bool GetBoolean(const std::string& path,
+ bool* out_value) const OVERRIDE;
+
+ private:
+ std::vector<HostConfig*> configs_;
Lambros 2012/08/01 01:12:48 Optional: Use ScopedVector here?
Sergey Ulanov 2012/08/01 01:19:11 Done.
+
+ DISALLOW_COPY_AND_ASSIGN(CompositeHostConfig);
+};
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_COMPOSITE_HOST_CONFIG_H_
« 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