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

Unified Diff: remoting/host/setup/host_starter.cc

Issue 12316083: Move HostKeyPair into protocol::KeyPair. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 7 years, 9 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/setup/host_starter.h ('k') | remoting/host/test_key_pair.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/setup/host_starter.cc
diff --git a/remoting/host/setup/host_starter.cc b/remoting/host/setup/host_starter.cc
index 13cb685a4961876903687b407d471915f3f0bbbc..90c492491bd372b9a68cbfacf777a8633d4d799a 100644
--- a/remoting/host/setup/host_starter.cc
+++ b/remoting/host/setup/host_starter.cc
@@ -106,9 +106,9 @@ void HostStarter::OnGetUserInfoResponse(const std::string& user_email) {
user_email_ = user_email;
// Register the host.
host_id_ = base::GenerateGUID();
- key_pair_.Generate();
+ key_pair_ = RsaKeyPair::Generate();
service_client_->RegisterHost(
- host_id_, host_name_, key_pair_.GetPublicKey(), access_token_, this);
+ host_id_, host_name_, key_pair_->GetPublicKey(), access_token_, this);
}
void HostStarter::OnHostRegistered() {
@@ -124,7 +124,7 @@ void HostStarter::OnHostRegistered() {
config->SetString("oauth_refresh_token", refresh_token_);
config->SetString("host_id", host_id_);
config->SetString("host_name", host_name_);
- config->SetString("private_key", key_pair_.GetAsString());
+ config->SetString("private_key", key_pair_->ToString());
config->SetString("host_secret_hash", host_secret_hash);
daemon_controller_->SetConfigAndStart(
config.Pass(), consent_to_data_collection_,
« no previous file with comments | « remoting/host/setup/host_starter.h ('k') | remoting/host/test_key_pair.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698