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

Unified Diff: remoting/host/in_memory_host_config.cc

Issue 10007048: Cleanup and simplify HostConfig and JsonHostConfig. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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/host/json_host_config.h » ('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
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);
}
« no previous file with comments | « remoting/host/in_memory_host_config.h ('k') | remoting/host/json_host_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698