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

Unified Diff: chrome/browser/supervised_user/supervised_user_settings_service.cc

Issue 2004043002: Supervised Users Initiated Installs v2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kid_initiated_install
Patch Set: Fixing the build again! Created 4 years, 6 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 | « chrome/browser/supervised_user/supervised_user_settings_service.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/supervised_user/supervised_user_settings_service.cc
diff --git a/chrome/browser/supervised_user/supervised_user_settings_service.cc b/chrome/browser/supervised_user/supervised_user_settings_service.cc
index c582812e98e48f4091fa2a0a543141cbc1fe6b5a..cf8dc890ea57decc7ee5efe0f2d04216edde10bf 100644
--- a/chrome/browser/supervised_user/supervised_user_settings_service.cc
+++ b/chrome/browser/supervised_user/supervised_user_settings_service.cc
@@ -135,7 +135,19 @@ void SupervisedUserSettingsService::UploadItem(
const std::string& key,
std::unique_ptr<base::Value> value) {
DCHECK(!SettingShouldApplyToPrefs(key));
+ PushItemToSync(key, std::move(value));
+}
+
+void SupervisedUserSettingsService::UpdateSetting(
+ const std::string& key,
+ std::unique_ptr<base::Value> value) {
+ PushItemToSync(key, std::move(value));
+ InformSubscribers();
+}
+void SupervisedUserSettingsService::PushItemToSync(
+ const std::string& key,
+ std::unique_ptr<base::Value> value) {
std::string key_suffix = key;
base::DictionaryValue* dict = nullptr;
if (sync_processor_) {
@@ -157,7 +169,7 @@ void SupervisedUserSettingsService::UploadItem(
content::RecordAction(UserMetricsAction("ManagedUsers_UploadItem_Queued"));
dict = GetQueuedItems();
}
- dict->SetWithoutPathExpansion(key_suffix, value.release());
+ dict->SetWithoutPathExpansion(key_suffix, std::move(value));
}
void SupervisedUserSettingsService::SetLocalSetting(
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_settings_service.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698