| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef REMOTING_HOST_IN_MEMORY_HOST_CONFIG_H_ | 5 #ifndef REMOTING_HOST_IN_MEMORY_HOST_CONFIG_H_ |
| 6 #define REMOTING_HOST_IN_MEMORY_HOST_CONFIG_H_ | 6 #define REMOTING_HOST_IN_MEMORY_HOST_CONFIG_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/file_path.h" | |
| 11 #include "base/lock.h" | 10 #include "base/lock.h" |
| 12 #include "base/ref_counted.h" | 11 #include "base/ref_counted.h" |
| 13 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
| 14 #include "remoting/host/host_config.h" | 13 #include "remoting/host/host_config.h" |
| 15 | 14 |
| 16 class DictionaryValue; | 15 class DictionaryValue; |
| 17 class Task; | 16 class Task; |
| 18 | 17 |
| 19 namespace remoting { | 18 namespace remoting { |
| 20 | 19 |
| 21 // In-memory host config. Used by unittests. | 20 // In-memory host config. Used by unittests. |
| 22 class InMemoryHostConfig : public MutableHostConfig { | 21 class InMemoryHostConfig : public MutableHostConfig { |
| 23 public: | 22 public: |
| 24 InMemoryHostConfig(); | 23 InMemoryHostConfig(); |
| 24 virtual ~InMemoryHostConfig(); |
| 25 | 25 |
| 26 // MutableHostConfig interface. | 26 // MutableHostConfig interface. |
| 27 virtual bool GetString(const std::string& path, std::string* out_value); | 27 virtual bool GetString(const std::string& path, std::string* out_value); |
| 28 | 28 |
| 29 virtual void Update(Task* task); | 29 virtual void Update(Task* task); |
| 30 | 30 |
| 31 virtual void SetString(const std::string& path, const std::string& in_value); | 31 virtual void SetString(const std::string& path, const std::string& in_value); |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 Lock lock_; | 34 Lock lock_; |
| 35 scoped_ptr<DictionaryValue> values_; | 35 scoped_ptr<DictionaryValue> values_; |
| 36 | 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(InMemoryHostConfig); | 37 DISALLOW_COPY_AND_ASSIGN(InMemoryHostConfig); |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 } // namespace remoting | 40 } // namespace remoting |
| 41 | 41 |
| 42 #endif // REMOTING_HOST_IN_MEMORY_HOST_CONFIG_H_ | 42 #endif // REMOTING_HOST_IN_MEMORY_HOST_CONFIG_H_ |
| OLD | NEW |