| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 11 matching lines...) Expand all Loading... |
| 22 JsonHostConfig(const FilePath& filename); | 22 JsonHostConfig(const FilePath& filename); |
| 23 virtual ~JsonHostConfig(); | 23 virtual ~JsonHostConfig(); |
| 24 | 24 |
| 25 virtual bool Read(); | 25 virtual bool Read(); |
| 26 | 26 |
| 27 // MutableHostConfig interface. | 27 // MutableHostConfig interface. |
| 28 virtual bool Save() OVERRIDE; | 28 virtual bool Save() OVERRIDE; |
| 29 | 29 |
| 30 std::string GetSerializedData(); | 30 std::string GetSerializedData(); |
| 31 | 31 |
| 32 // Sets the configuration from serialized JSON data. Returns false if the data |
| 33 // could not be parsed. |
| 34 bool SetSerializedData(const std::string& config); |
| 35 |
| 32 private: | 36 private: |
| 33 FilePath filename_; | 37 FilePath filename_; |
| 34 | 38 |
| 35 DISALLOW_COPY_AND_ASSIGN(JsonHostConfig); | 39 DISALLOW_COPY_AND_ASSIGN(JsonHostConfig); |
| 36 }; | 40 }; |
| 37 | 41 |
| 38 } // namespace remoting | 42 } // namespace remoting |
| 39 | 43 |
| 40 #endif // REMOTING_HOST_JSON_HOST_CONFIG_H_ | 44 #endif // REMOTING_HOST_JSON_HOST_CONFIG_H_ |
| OLD | NEW |