Index: remoting/host/win/elevated_controller.cc |
diff --git a/remoting/host/win/elevated_controller.cc b/remoting/host/win/elevated_controller.cc |
index 62d70c4f0ac54f06ea43f5b9422672e9d1485912..c6bd37bb1e1db8e18e488208010bc77e0797344c 100644 |
--- a/remoting/host/win/elevated_controller.cc |
+++ b/remoting/host/win/elevated_controller.cc |
@@ -52,10 +52,11 @@ const char kUnprivilegedConfigFileSecurityDescriptor[] = |
// Configuration keys. |
const char kHostId[] = "host_id"; |
const char kXmppLogin[] = "xmpp_login"; |
+const char kHostOwner[] = "host_owner"; |
const char kHostSecretHash[] = "host_secret_hash"; |
// The configuration keys that cannot be specified in UpdateConfig(). |
-const char* const kReadonlyKeys[] = { kHostId, kXmppLogin }; |
+const char* const kReadonlyKeys[] = { kHostId, kHostOwner, kXmppLogin }; |
// The configuration keys whose values may be read by GetConfig(). |
const char* const kUnprivilegedConfigKeys[] = { kHostId, kXmppLogin }; |
@@ -222,9 +223,14 @@ HRESULT WriteConfig(const char* content, size_t length, HWND owner_window) { |
if (!config_value->GetAsDictionary(&config_dict)) { |
return E_FAIL; |
} |
- std::string email, host_id, host_secret_hash; |
- if (!config_dict->GetString(kXmppLogin, &email) || |
- !config_dict->GetString(kHostId, &host_id) || |
+ std::string email; |
+ if (!config_dict->GetString(kHostOwner, &email)) { |
+ if (!config_dict->GetString(kXmppLogin, &email)) { |
alexeypa (please no reviews)
2013/09/23 22:37:02
nit: no need for this pair of brackets.
|
+ return E_FAIL; |
+ } |
+ } |
+ std::string host_id, host_secret_hash; |
+ if (!config_dict->GetString(kHostId, &host_id) || |
!config_dict->GetString(kHostSecretHash, &host_secret_hash)) { |
return E_FAIL; |
} |