diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-07 19:20:06 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-07 19:20:06 +0000 |
commit | 30224c162fbe39aa325248d116e2f02427ac7c8c (patch) | |
tree | 5fdca261c47f1e86a764e2ce6f8a661ac076ff7d /remoting/host/host_config.h | |
parent | b5457c7d515524938eafd6f0040f5a9bca7ddbbe (diff) | |
download | chromium_src-30224c162fbe39aa325248d116e2f02427ac7c8c.zip chromium_src-30224c162fbe39aa325248d116e2f02427ac7c8c.tar.gz chromium_src-30224c162fbe39aa325248d116e2f02427ac7c8c.tar.bz2 |
Cleanup and simplify HostConfig and JsonHostConfig.
These classes were previously overdesigned. Simplifying them.
- Config doesn't need to be ref-counted.
- Save() is synchronous now.
- Config is NonThreadSafe now.
BUG=120950
Review URL: http://codereview.chromium.org/10007048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131288 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/host_config.h')
-rw-r--r-- | remoting/host/host_config.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/remoting/host/host_config.h b/remoting/host/host_config.h index 4c7ed77..6124598 100644 --- a/remoting/host/host_config.h +++ b/remoting/host/host_config.h @@ -7,7 +7,7 @@ #include <string> -#include "base/memory/ref_counted.h" +#include "base/basictypes.h" namespace remoting { @@ -34,14 +34,16 @@ extern const char kHostSecretHashConfigPath[]; extern const char kPrivateKeyConfigPath[]; // HostConfig interace provides read-only access to host configuration. -class HostConfig : public base::RefCountedThreadSafe<HostConfig> { +class HostConfig { public: HostConfig() {} virtual ~HostConfig() {} - virtual bool GetString(const std::string& path, std::string* out_value) = 0; - virtual bool GetBoolean(const std::string& path, bool* out_value) = 0; + virtual bool GetString(const std::string& path, + std::string* out_value) const = 0; + virtual bool GetBoolean(const std::string& path, bool* out_value) const = 0; + private: DISALLOW_COPY_AND_ASSIGN(HostConfig); }; @@ -56,8 +58,8 @@ class MutableHostConfig : public HostConfig { const std::string& in_value) = 0; virtual void SetBoolean(const std::string& path, bool in_value) = 0; - // Save's changes. - virtual void Save() = 0; + // Saves changes. + virtual bool Save() = 0; DISALLOW_COPY_AND_ASSIGN(MutableHostConfig); }; |