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

Unified Diff: remoting/host/in_memory_host_config.cc

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/in_memory_host_config.h ('k') | remoting/remoting.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/in_memory_host_config.cc
diff --git a/remoting/host/in_memory_host_config.cc b/remoting/host/in_memory_host_config.cc
new file mode 100644
index 0000000000000000000000000000000000000000..2450638a34fe980e2a249cc563c1bc1dfef43ec8
--- /dev/null
+++ b/remoting/host/in_memory_host_config.cc
@@ -0,0 +1,36 @@
+// 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.
+
+#include "remoting/host/in_memory_host_config.h"
+
+#include "base/task.h"
+#include "base/values.h"
+
+namespace remoting {
+
+InMemoryHostConfig::InMemoryHostConfig()
+ : values_(new DictionaryValue()) {
+}
+
+bool InMemoryHostConfig::GetString(const std::string& path,
+ std::string* out_value) {
+ AutoLock auto_lock(lock_);
+ return values_->GetString(path, out_value);
+}
+
+void InMemoryHostConfig::Update(Task* task) {
+ {
+ AutoLock auto_lock(lock_);
+ task->Run();
+ }
+ delete task;
+}
+
+void InMemoryHostConfig::SetString(const std::string& path,
+ const std::string& in_value) {
+ lock_.AssertAcquired();
+ values_->SetString(path, in_value);
+}
+
+} // namespace remoting
« no previous file with comments | « remoting/host/in_memory_host_config.h ('k') | remoting/remoting.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698