Chromium Code Reviews| 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..48d45a5bb5739c83285930ec50237576b3dab39b 100644 |
| --- a/remoting/host/elevated_controller_win.cc |
| +++ b/remoting/host/elevated_controller_win.cc |
| @@ -16,6 +16,12 @@ |
| #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" |
| + |
| +// HINSTANCE from WinMain. This is needed to find our dialog resource. |
| +// This is defined in elevated_controller_module_win.cc |
| +extern HINSTANCE g_hInstance; |
| namespace { |
| @@ -96,6 +102,28 @@ HRESULT WriteConfig(const FilePath& filename, |
| return E_FAIL; |
| } |
| + // Extract the configuration data that the user will verify. |
| + scoped_ptr<base::Value> configValue(base::JSONReader::Read(content)); |
|
alexeypa (please no reviews)
2012/04/12 21:20:41
configValue -> config_value
simonmorris
2012/04/12 22:11:44
Done.
|
| + if (!configValue.get()) { |
| + return E_FAIL; |
| + } |
| + base::DictionaryValue* configDict = NULL; |
|
alexeypa (please no reviews)
2012/04/12 21:20:41
configDict -> config_dict.
simonmorris
2012/04/12 22:11:44
Done.
|
| + if (!configValue->GetAsDictionary(&configDict)) { |
| + return E_FAIL; |
| + } |
| + std::string email, host_id, host_secret_hash; |
| + if (!configDict->GetString("xmpp_login", &email) || |
| + !configDict->GetString("host_id", &host_id) || |
| + !configDict->GetString("host_secret_hash", &host_secret_hash)) { |
| + return E_FAIL; |
| + } |
| + |
| + // Ask the user to verify the configuration. |
| + remoting::VerifyConfigWindowWin verifyWin(email, host_id, host_secret_hash); |
|
alexeypa (please no reviews)
2012/04/12 21:20:41
verifyWin -> verify_win
simonmorris
2012/04/12 22:11:44
Done.
|
| + if (!verifyWin.Run()) { |
| + return E_FAIL; |
|
alexeypa (please no reviews)
2012/04/12 21:20:41
HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED) _maybe_ a
simonmorris
2012/04/12 22:11:44
This way is consistent with the existing code, whi
|
| + } |
| + |
| // Create a security descriptor for the configuration file. |
| SECURITY_ATTRIBUTES security_attributes; |
| security_attributes.nLength = sizeof(security_attributes); |