diff options
author | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-08 23:28:48 +0000 |
---|---|---|
committer | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-08 23:28:48 +0000 |
commit | 6c78b9df1646239fbf2ce137825f0146e36d6d4a (patch) | |
tree | b621cad0d18bccc279527d7b0d9d8d6124f702d9 /cloud_print/service | |
parent | 55d448fc1913406a9d94dce5550d22d7b180a0e8 (diff) | |
download | chromium_src-6c78b9df1646239fbf2ce137825f0146e36d6d4a.zip chromium_src-6c78b9df1646239fbf2ce137825f0146e36d6d4a.tar.gz chromium_src-6c78b9df1646239fbf2ce137825f0146e36d6d4a.tar.bz2 |
Restore proxy_id after generation new Service State file.
Review URL: https://chromiumcodereview.appspot.com/13771017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192947 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print/service')
-rw-r--r-- | cloud_print/service/win/chrome_launcher.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cloud_print/service/win/chrome_launcher.cc b/cloud_print/service/win/chrome_launcher.cc index ecce60c..1d5395a 100644 --- a/cloud_print/service/win/chrome_launcher.cc +++ b/cloud_print/service/win/chrome_launcher.cc @@ -85,7 +85,8 @@ GURL GetCloudPrintServiceEnableURLWithSignin(const std::string& proxy_id) { url, "continue", GetCloudPrintServiceEnableURL(proxy_id).spec()); } -std::string UpdateServiceState(const std::string& json) { +std::string UpdateServiceState(const std::string& json, + const std::string& proxy_id) { std::string result; scoped_ptr<base::Value> service_state(base::JSONReader::Read(json)); @@ -107,9 +108,10 @@ std::string UpdateServiceState(const std::string& json) { dictionary->Set(prefs::kCloudPrintRoot, cloud_print_root); dictionary->SetBoolean(prefs::kCloudPrintXmppPingEnabled, true); - - base::JSONWriter::Write(dictionary, &result); - + dictionary->SetString(prefs::kCloudPrintProxyId, proxy_id); + base::JSONWriter::WriteWithOptions(dictionary, + base::JSONWriter::OPTIONS_PRETTY_PRINT, + &result); return result; } @@ -302,6 +304,6 @@ std::string ChromeLauncher::CreateServiceStateFile( return result; } - return UpdateServiceState(json); + return UpdateServiceState(json, proxy_id); } |