1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef REMOTING_HOST_IN_MEMORY_HOST_CONFIG_H_
6 #define REMOTING_HOST_IN_MEMORY_HOST_CONFIG_H_
10 #include "base/memory/scoped_ptr.h"
11 #include "base/threading/non_thread_safe.h"
12 #include "remoting/host/host_config.h"
15 class DictionaryValue
;
20 // In-memory host config. Used by unittests.
21 class InMemoryHostConfig
: public MutableHostConfig
,
22 public base::NonThreadSafe
{
25 virtual ~InMemoryHostConfig();
27 // MutableHostConfig interface.
28 virtual bool GetString(const std::string
& path
,
29 std::string
* out_value
) const OVERRIDE
;
30 virtual bool GetBoolean(const std::string
& path
,
31 bool* out_value
) const OVERRIDE
;
33 virtual void SetString(const std::string
& path
,
34 const std::string
& in_value
) OVERRIDE
;
35 virtual void SetBoolean(const std::string
& path
, bool in_value
) OVERRIDE
;
37 virtual bool CopyFrom(const base::DictionaryValue
* dictionary
) OVERRIDE
;
39 virtual bool Save() OVERRIDE
;
42 scoped_ptr
<base::DictionaryValue
> values_
;
45 DISALLOW_COPY_AND_ASSIGN(InMemoryHostConfig
);
48 } // namespace remoting
50 #endif // REMOTING_HOST_IN_MEMORY_HOST_CONFIG_H_