| 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 #include "remoting/host/elevated_controller_win.h" | 5 #include "remoting/host/elevated_controller_win.h" |
| 6 | 6 |
| 7 #include <sddl.h> | 7 #include <sddl.h> |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 } | 188 } |
| 189 std::string email, host_id, host_secret_hash; | 189 std::string email, host_id, host_secret_hash; |
| 190 if (!config_dict->GetString(kXmppLogin, &email) || | 190 if (!config_dict->GetString(kXmppLogin, &email) || |
| 191 !config_dict->GetString(kHostId, &host_id) || | 191 !config_dict->GetString(kHostId, &host_id) || |
| 192 !config_dict->GetString(kHostSecretHash, &host_secret_hash)) { | 192 !config_dict->GetString(kHostSecretHash, &host_secret_hash)) { |
| 193 return E_FAIL; | 193 return E_FAIL; |
| 194 } | 194 } |
| 195 | 195 |
| 196 // Ask the user to verify the configuration. | 196 // Ask the user to verify the configuration. |
| 197 remoting::VerifyConfigWindowWin verify_win(email, host_id, host_secret_hash); | 197 remoting::VerifyConfigWindowWin verify_win(email, host_id, host_secret_hash); |
| 198 if (!verify_win.Run()) { | 198 if (verify_win.DoModal() != IDOK) { |
| 199 return E_FAIL; | 199 return E_FAIL; |
| 200 } | 200 } |
| 201 | 201 |
| 202 // Extract the unprivileged fields from the configuration. | 202 // Extract the unprivileged fields from the configuration. |
| 203 base::DictionaryValue unprivileged_config_dict; | 203 base::DictionaryValue unprivileged_config_dict; |
| 204 for (int i = 0; i < arraysize(kUnprivilegedConfigKeys); ++i) { | 204 for (int i = 0; i < arraysize(kUnprivilegedConfigKeys); ++i) { |
| 205 const char* key = kUnprivilegedConfigKeys[i]; | 205 const char* key = kUnprivilegedConfigKeys[i]; |
| 206 string16 value; | 206 string16 value; |
| 207 if (config_dict->GetString(key, &value)) { | 207 if (config_dict->GetString(key, &value)) { |
| 208 unprivileged_config_dict.SetString(key, value); | 208 unprivileged_config_dict.SetString(key, value); |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 << "Failed to open to the '" << kWindowsServiceName << "' service"; | 446 << "Failed to open to the '" << kWindowsServiceName << "' service"; |
| 447 | 447 |
| 448 return HRESULT_FROM_WIN32(error); | 448 return HRESULT_FROM_WIN32(error); |
| 449 } | 449 } |
| 450 | 450 |
| 451 service_out->Set(service.Take()); | 451 service_out->Set(service.Take()); |
| 452 return S_OK; | 452 return S_OK; |
| 453 } | 453 } |
| 454 | 454 |
| 455 } // namespace remoting | 455 } // namespace remoting |
| OLD | NEW |