Commit 23d9573a authored by tengs's avatar tengs Committed by Commit bot

Update EasyUnlockToggleFlow to disable all devices when turning off Smart Lock.

Review URL: https://codereview.chromium.org/685983004

Cr-Commit-Position: refs/heads/master@{#302543}
parent 0f18be91
...@@ -88,11 +88,14 @@ GURL EasyUnlockToggleFlow::ToggleApiCall::CreateApiCallUrl() { ...@@ -88,11 +88,14 @@ GURL EasyUnlockToggleFlow::ToggleApiCall::CreateApiCallUrl() {
} }
std::string EasyUnlockToggleFlow::ToggleApiCall::CreateApiCallBody() { std::string EasyUnlockToggleFlow::ToggleApiCall::CreateApiCallBody() {
const char kBodyFormat[] = "{\"enable\":%s,\"publicKey\":\"%s\"}"; const char kEnableBodyFormat[] = "{\"enable\": true,\"publicKey\":\"%s\"}";
return base::StringPrintf( const char kDisableBodyFormat[] =
kBodyFormat, "{ \"enable\": false, \"applyToAll\": true }";
toggle_enable_ ? "true" : "false",
phone_public_key_.c_str()); if (toggle_enable_)
return base::StringPrintf(kEnableBodyFormat, phone_public_key_.c_str());
else
return std::string(kDisableBodyFormat);
} }
std::string std::string
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment