| 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
|
| index 4df3ada6427cecf92550717f5785b1f87cc8c02e..3de5be7935ba407473ddb0faefc8be5270c182c3 100644
|
| --- a/remoting/host/in_memory_host_config.cc
|
| +++ b/remoting/host/in_memory_host_config.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "remoting/host/in_memory_host_config.h"
|
|
|
| +#include "base/logging.h"
|
| #include "base/values.h"
|
|
|
| namespace remoting {
|
| @@ -15,28 +16,31 @@ InMemoryHostConfig::InMemoryHostConfig()
|
| InMemoryHostConfig::~InMemoryHostConfig() {}
|
|
|
| bool InMemoryHostConfig::GetString(const std::string& path,
|
| - std::string* out_value) {
|
| - base::AutoLock auto_lock(lock_);
|
| + std::string* out_value) const {
|
| + DCHECK(CalledOnValidThread());
|
| return values_->GetString(path, out_value);
|
| }
|
|
|
| -bool InMemoryHostConfig::GetBoolean(const std::string& path, bool* out_value) {
|
| - base::AutoLock auto_lock(lock_);
|
| +bool InMemoryHostConfig::GetBoolean(const std::string& path,
|
| + bool* out_value) const {
|
| + DCHECK(CalledOnValidThread());
|
| return values_->GetBoolean(path, out_value);
|
| }
|
|
|
| -void InMemoryHostConfig::Save() {
|
| - // Save is NOP for in-memory host config.
|
| +bool InMemoryHostConfig::Save() {
|
| + // Saving in-memory host config is not supported.
|
| + NOTREACHED();
|
| + return false;
|
| }
|
|
|
| void InMemoryHostConfig::SetString(const std::string& path,
|
| const std::string& in_value) {
|
| - base::AutoLock auto_lock(lock_);
|
| + DCHECK(CalledOnValidThread());
|
| values_->SetString(path, in_value);
|
| }
|
|
|
| void InMemoryHostConfig::SetBoolean(const std::string& path, bool in_value) {
|
| - base::AutoLock auto_lock(lock_);
|
| + DCHECK(CalledOnValidThread());
|
| values_->SetBoolean(path, in_value);
|
| }
|
|
|
|
|