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

Unified Diff: remoting/host/in_memory_host_config.h

Issue 3303001: Basic user access check for chromoting host. (Closed)
Patch Set: - Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/host_config.h ('k') | remoting/host/in_memory_host_config.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/in_memory_host_config.h
diff --git a/remoting/host/in_memory_host_config.h b/remoting/host/in_memory_host_config.h
new file mode 100644
index 0000000000000000000000000000000000000000..6a44e396766fc1fbe5714134687c4352772c4325
--- /dev/null
+++ b/remoting/host/in_memory_host_config.h
@@ -0,0 +1,42 @@
+// Copyright (c) 2010 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_IN_MEMORY_HOST_CONFIG_H_
+#define REMOTING_HOST_IN_MEMORY_HOST_CONFIG_H_
+
+#include <string>
+
+#include "base/file_path.h"
+#include "base/lock.h"
+#include "base/ref_counted.h"
+#include "base/scoped_ptr.h"
+#include "remoting/host/host_config.h"
+
+class DictionaryValue;
+class Task;
+
+namespace remoting {
+
+// In-memory host config. Used by unittests.
+class InMemoryHostConfig : public MutableHostConfig {
+ public:
+ InMemoryHostConfig();
+
+ // MutableHostConfig interface.
+ virtual bool GetString(const std::string& path, std::string* out_value);
+
+ virtual void Update(Task* task);
+
+ virtual void SetString(const std::string& path, const std::string& in_value);
+
+ private:
+ Lock lock_;
+ scoped_ptr<DictionaryValue> values_;
+
+ DISALLOW_COPY_AND_ASSIGN(InMemoryHostConfig);
+};
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_IN_MEMORY_HOST_CONFIG_H_
« no previous file with comments | « remoting/host/host_config.h ('k') | remoting/host/in_memory_host_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698