Index: remoting/host/elevated_controller_win.cc |
diff --git a/remoting/host/elevated_controller_win.cc b/remoting/host/elevated_controller_win.cc |
index 1a8bec6145d4310ee041f44e2224913fd2d3071a..ad4ebab60a1e7ee8d15f3ee5ffd05601ac7effb8 100644 |
--- a/remoting/host/elevated_controller_win.cc |
+++ b/remoting/host/elevated_controller_win.cc |
@@ -16,6 +16,8 @@ |
#include "base/values.h" |
#include "base/win/scoped_handle.h" |
#include "remoting/host/branding.h" |
+#include "remoting/host/elevated_controller_resource.h" |
+#include "remoting/host/verify_config_window_win.h" |
namespace { |
@@ -96,6 +98,28 @@ HRESULT WriteConfig(const FilePath& filename, |
return E_FAIL; |
} |
+ // Extract the configuration data that the user will verify. |
+ scoped_ptr<base::Value> config_value(base::JSONReader::Read(content)); |
+ if (!config_value.get()) { |
+ return E_FAIL; |
+ } |
+ base::DictionaryValue* config_dict = NULL; |
+ if (!config_value->GetAsDictionary(&config_dict)) { |
+ return E_FAIL; |
+ } |
+ std::string email, host_id, host_secret_hash; |
+ if (!config_dict->GetString("xmpp_login", &email) || |
+ !config_dict->GetString("host_id", &host_id) || |
+ !config_dict->GetString("host_secret_hash", &host_secret_hash)) { |
+ return E_FAIL; |
+ } |
+ |
+ // Ask the user to verify the configuration. |
+ remoting::VerifyConfigWindowWin verify_win(email, host_id, host_secret_hash); |
+ if (!verify_win.Run()) { |
+ return E_FAIL; |
+ } |
+ |
// Create a security descriptor for the configuration file. |
SECURITY_ATTRIBUTES security_attributes; |
security_attributes.nLength = sizeof(security_attributes); |