OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 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 #include "remoting/host/in_memory_host_config.h" |
| 6 |
| 7 #include "base/task.h" |
| 8 #include "base/values.h" |
| 9 |
| 10 namespace remoting { |
| 11 |
| 12 InMemoryHostConfig::InMemoryHostConfig() |
| 13 : values_(new DictionaryValue()) { |
| 14 } |
| 15 |
| 16 bool InMemoryHostConfig::GetString(const std::string& path, |
| 17 std::string* out_value) { |
| 18 AutoLock auto_lock(lock_); |
| 19 return values_->GetString(path, out_value); |
| 20 } |
| 21 |
| 22 void InMemoryHostConfig::Update(Task* task) { |
| 23 { |
| 24 AutoLock auto_lock(lock_); |
| 25 task->Run(); |
| 26 } |
| 27 delete task; |
| 28 } |
| 29 |
| 30 void InMemoryHostConfig::SetString(const std::string& path, |
| 31 const std::string& in_value) { |
| 32 lock_.AssertAcquired(); |
| 33 values_->SetString(path, in_value); |
| 34 } |
| 35 |
| 36 } // namespace remoting |
OLD | NEW |