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

Unified Diff: chrome/browser/signin/easy_unlock_toggle_flow.cc

Issue 685983004: Update EasyUnlockToggleFlow to disable all devices when turning off Smart Lock. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/easy_unlock_toggle_flow.cc
diff --git a/chrome/browser/signin/easy_unlock_toggle_flow.cc b/chrome/browser/signin/easy_unlock_toggle_flow.cc
index 22f20525df0d8d00b1d760be5517dfc9ad18f8f7..bb277644d3115f047191b28868bae45082b16219 100644
--- a/chrome/browser/signin/easy_unlock_toggle_flow.cc
+++ b/chrome/browser/signin/easy_unlock_toggle_flow.cc
@@ -88,11 +88,14 @@ GURL EasyUnlockToggleFlow::ToggleApiCall::CreateApiCallUrl() {
}
std::string EasyUnlockToggleFlow::ToggleApiCall::CreateApiCallBody() {
- const char kBodyFormat[] = "{\"enable\":%s,\"publicKey\":\"%s\"}";
- return base::StringPrintf(
- kBodyFormat,
- toggle_enable_ ? "true" : "false",
- phone_public_key_.c_str());
+ const char kEnableBodyFormat[] = "{\"enable\": true,\"publicKey\":\"%s\"}";
+ const char kDisableBodyFormat[] =
+ "{ \"enable\": false, \"applyToAll\": true }";
+
+ if (toggle_enable_)
+ return base::StringPrintf(kEnableBodyFormat, phone_public_key_.c_str());
+ else
+ return std::string(kDisableBodyFormat);
}
std::string
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698