summaryrefslogtreecommitdiffstats
path: root/chrome/service
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-16 19:58:28 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-16 19:58:28 +0000
commit28b3b2e41e97a7c6bf39d598febf8bc1677a7079 (patch)
tree69df239b18a093ddc4be6d4a8abacff402d814f4 /chrome/service
parenta10af6edd3747f0120d0a085772e485902ae6029 (diff)
downloadchromium_src-28b3b2e41e97a7c6bf39d598febf8bc1677a7079.zip
chromium_src-28b3b2e41e97a7c6bf39d598febf8bc1677a7079.tar.gz
chromium_src-28b3b2e41e97a7c6bf39d598febf8bc1677a7079.tar.bz2
HostConfig interface updates.
- Simplified mutation semantic: Update() replaced with Save(). Set methods can be called at any time. - JsonHostConfig now inherits from InMemoryHostConfig to avoid code duplication. - Added kHostEnabledConfigPath. BUG=None TEST=Unittests. Review URL: http://codereview.chromium.org/5738008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69454 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/service')
-rw-r--r--chrome/service/service_process.cc24
1 files changed, 5 insertions, 19 deletions
diff --git a/chrome/service/service_process.cc b/chrome/service/service_process.cc
index aa91ca8..0d6ac40 100644
--- a/chrome/service/service_process.cc
+++ b/chrome/service/service_process.cc
@@ -332,18 +332,6 @@ void ServiceProcess::OnRemotingDirectoryError() {
// to the client that started this.
}
-// A util function to update the login information to host config.
-static void SaveChromotingConfigFunc(remoting::JsonHostConfig* config,
- const std::string& login,
- const std::string& token,
- const std::string& host_id,
- const std::string& host_name) {
- config->SetString(remoting::kXmppLoginConfigPath, login);
- config->SetString(remoting::kXmppAuthTokenConfigPath, token);
- config->SetString(remoting::kHostIdConfigPath, host_id);
- config->SetString(remoting::kHostNameConfigPath, host_name);
-}
-
void ServiceProcess::SaveChromotingConfig(
const std::string& login,
const std::string& token,
@@ -354,13 +342,11 @@ void ServiceProcess::SaveChromotingConfig(
LoadChromotingConfig();
// And then do the update.
- chromoting_config_->Update(
- NewRunnableFunction(&SaveChromotingConfigFunc,
- chromoting_config_,
- login,
- token,
- host_id,
- host_name));
+ chromoting_config_->SetString(remoting::kXmppLoginConfigPath, login);
+ chromoting_config_->SetString(remoting::kXmppAuthTokenConfigPath, token);
+ chromoting_config_->SetString(remoting::kHostIdConfigPath, host_id);
+ chromoting_config_->SetString(remoting::kHostNameConfigPath, host_name);
+ chromoting_config_->Save();
// And then save the key pair.
host_key_pair->Save(chromoting_config_);