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

Unified Diff: remoting/host/elevated_controller_win.cc

Issue 10071025: [Chromoting] Make the Windows host controller ask the user to confirm host registration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add license boilerplate. Created 8 years, 8 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/elevated_controller_resource.h ('k') | remoting/host/verify_config_window_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « remoting/host/elevated_controller_resource.h ('k') | remoting/host/verify_config_window_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698