Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Unified Diff: remoting/host/win/elevated_controller.cc

Issue 23995027: Show host owner rather than xmpp login on the UI where available. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make email logic explicit. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/mac/me2me_preference_pane.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « remoting/host/mac/me2me_preference_pane.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698