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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 #import <PreferencePanes/PreferencePanes.h> | 6 #import <PreferencePanes/PreferencePanes.h> |
7 #import <SecurityInterface/SFAuthorizationView.h> | 7 #import <SecurityInterface/SFAuthorizationView.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "third_party/jsoncpp/source/include/json/value.h" | 12 #include "third_party/jsoncpp/source/include/json/value.h" |
13 | 13 |
14 namespace remoting { | 14 namespace remoting { |
15 | 15 |
16 // This is an implementation of JsonHostConfig which does not use code from | 16 // This is an implementation of JsonHostConfig which does not use code from |
17 // the "base" target, so it can be built for 64-bit on Mac OS X. | 17 // the "base" target, so it can be built for 64-bit on Mac OS X. |
18 | 18 |
19 // TODO(lambroslambrou): Once the "base" target has 64-bit support, remove this | 19 // TODO(lambroslambrou): Once the "base" target has 64-bit support, remove this |
20 // implementation and use the one in remoting/host/json_host_config.h - see | 20 // implementation and use the one in remoting/host/json_host_config.h - see |
21 // http://crbug.com/128122. | 21 // http://crbug.com/128122. |
22 class JsonHostConfig { | 22 class JsonHostConfig { |
23 public: | 23 public: |
24 JsonHostConfig(const std::string& filename); | 24 explicit JsonHostConfig(const std::string& filename); |
25 ~JsonHostConfig(); | 25 ~JsonHostConfig(); |
26 | 26 |
27 bool Read(); | 27 bool Read(); |
28 bool GetString(const std::string& path, std::string* out_value) const; | 28 bool GetString(const std::string& path, std::string* out_value) const; |
29 std::string GetSerializedData() const; | 29 std::string GetSerializedData() const; |
30 | 30 |
31 private: | 31 private: |
32 Json::Value config_; | 32 Json::Value config_; |
33 std::string filename_; | 33 std::string filename_; |
34 | 34 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 - (void)checkInstalledVersion; | 137 - (void)checkInstalledVersion; |
138 | 138 |
139 - (void)mismatchAlertDidEnd:(NSAlert*)alert | 139 - (void)mismatchAlertDidEnd:(NSAlert*)alert |
140 returnCode:(NSInteger)returnCode | 140 returnCode:(NSInteger)returnCode |
141 contextInfo:(void*)contextInfo; | 141 contextInfo:(void*)contextInfo; |
142 | 142 |
143 // Called when the user chooses OK when prompted to restart System Preferences. | 143 // Called when the user chooses OK when prompted to restart System Preferences. |
144 - (void)restartSystemPreferences; | 144 - (void)restartSystemPreferences; |
145 | 145 |
146 @end | 146 @end |
OLD | NEW |