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

Unified Diff: remoting/host/host_config.h

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/chromoting_host_unittest.cc ('k') | remoting/host/host_key_pair.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/host_config.h
diff --git a/remoting/host/host_config.h b/remoting/host/host_config.h
index 4c7ed7765a9a70040ac43207828bb68377c4fda6..6124598aabb97063c182daa7256e225283416096 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);
};
« no previous file with comments | « remoting/host/chromoting_host_unittest.cc ('k') | remoting/host/host_key_pair.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698