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

Side by Side Diff: remoting/host/json_host_config.h

Issue 3060034: Convert src/remoting to std::string/char* away from wstring/wchar_t*. (Closed)
Patch Set: Created 10 years, 4 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
« no previous file with comments | « remoting/host/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) 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_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"
(...skipping 13 matching lines...) Expand all
24 24
25 // JsonHostConfig implements MutableHostConfig for JSON file. 25 // JsonHostConfig implements MutableHostConfig for JSON file.
26 class JsonHostConfig : public MutableHostConfig { 26 class JsonHostConfig : public MutableHostConfig {
27 public: 27 public:
28 JsonHostConfig(const FilePath& pref_filename, 28 JsonHostConfig(const FilePath& pref_filename,
29 base::MessageLoopProxy* file_message_loop_proxy); 29 base::MessageLoopProxy* file_message_loop_proxy);
30 30
31 virtual bool Read(); 31 virtual bool Read();
32 32
33 // MutableHostConfig interface. 33 // MutableHostConfig interface.
34 virtual bool GetString(const std::wstring& path, 34 virtual bool GetString(const std::string& path, std::string* out_value);
35 std::wstring* out_value);
36 virtual bool GetString(const std::wstring& path,
37 std::string* out_value);
38 35
39 virtual void Update(Task* task); 36 virtual void Update(Task* task);
40 37
41 virtual void SetString(const std::wstring& path, 38 virtual void SetString(const std::string& path, const std::string& in_value);
42 const std::wstring& in_value);
43 virtual void SetString(const std::wstring& path,
44 const std::string& in_value);
45 39
46 private: 40 private:
47 void DoWrite(); 41 void DoWrite();
48 42
49 // |lock_| must be locked whenever we access values_; 43 // |lock_| must be locked whenever we access values_;
50 Lock lock_; 44 Lock lock_;
51 FilePath filename_; 45 FilePath filename_;
52 scoped_ptr<DictionaryValue> values_; 46 scoped_ptr<DictionaryValue> values_;
53 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; 47 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
54 48
55 DISALLOW_COPY_AND_ASSIGN(JsonHostConfig); 49 DISALLOW_COPY_AND_ASSIGN(JsonHostConfig);
56 }; 50 };
57 51
58 } // namespace remoting 52 } // namespace remoting
59 53
60 #endif // REMOTING_HOST_JSON_HOST_CONFIG_H_ 54 #endif // REMOTING_HOST_JSON_HOST_CONFIG_H_
OLDNEW
« no previous file with comments | « remoting/host/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