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

Side by Side Diff: remoting/host/json_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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/in_memory_host_config.cc ('k') | remoting/host/json_host_config.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_JSON_HOST_CONFIG_H_ 5 #ifndef REMOTING_HOST_JSON_HOST_CONFIG_H_
6 #define REMOTING_HOST_JSON_HOST_CONFIG_H_ 6 #define REMOTING_HOST_JSON_HOST_CONFIG_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "remoting/host/in_memory_host_config.h" 11 #include "remoting/host/in_memory_host_config.h"
14 12
15 namespace base { 13 namespace base {
16 class MessageLoopProxy; 14 class MessageLoopProxy;
17 } // namespace base 15 } // namespace base
18 16
19 namespace remoting { 17 namespace remoting {
20 18
21 // JsonHostConfig implements MutableHostConfig for JSON file. 19 // JsonHostConfig implements MutableHostConfig for JSON file.
22 class JsonHostConfig : public InMemoryHostConfig { 20 class JsonHostConfig : public InMemoryHostConfig {
23 public: 21 public:
24 JsonHostConfig(const FilePath& pref_filename, 22 JsonHostConfig(const FilePath& filename);
25 base::MessageLoopProxy* file_message_loop_proxy);
26 virtual ~JsonHostConfig(); 23 virtual ~JsonHostConfig();
27 24
28 virtual bool Read(); 25 virtual bool Read();
29 26
30 // MutableHostConfig interface. 27 // MutableHostConfig interface.
31 virtual void Save() OVERRIDE; 28 virtual bool Save() OVERRIDE;
32 29
33 private: 30 private:
34 void DoWrite();
35
36 FilePath filename_; 31 FilePath filename_;
37 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
38 32
39 DISALLOW_COPY_AND_ASSIGN(JsonHostConfig); 33 DISALLOW_COPY_AND_ASSIGN(JsonHostConfig);
40 }; 34 };
41 35
42 } // namespace remoting 36 } // namespace remoting
43 37
44 #endif // REMOTING_HOST_JSON_HOST_CONFIG_H_ 38 #endif // REMOTING_HOST_JSON_HOST_CONFIG_H_
OLDNEW
« no previous file with comments | « remoting/host/in_memory_host_config.cc ('k') | remoting/host/json_host_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698