| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/supervised_user/permission_request_creator_sync.h" | 5 #include "chrome/browser/supervised_user/permission_request_creator_sync.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" | 9 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" |
| 10 #include "chrome/browser/supervised_user/supervised_user_shared_settings_service
.h" | 10 #include "chrome/browser/supervised_user/supervised_user_shared_settings_service
.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 // Copy the notification setting of the custodian. | 67 // Copy the notification setting of the custodian. |
| 68 const base::Value* value = shared_settings_service_->GetValue( | 68 const base::Value* value = shared_settings_service_->GetValue( |
| 69 supervised_user_id_, kNotificationSetting); | 69 supervised_user_id_, kNotificationSetting); |
| 70 bool notifications_enabled = false; | 70 bool notifications_enabled = false; |
| 71 if (value) { | 71 if (value) { |
| 72 bool success = value->GetAsBoolean(¬ifications_enabled); | 72 bool success = value->GetAsBoolean(¬ifications_enabled); |
| 73 DCHECK(success); | 73 DCHECK(success); |
| 74 } | 74 } |
| 75 dict->SetBoolean(kNotificationSetting, notifications_enabled); | 75 dict->SetBoolean(kNotificationSetting, notifications_enabled); |
| 76 | 76 |
| 77 settings_service_->UploadItem(key, dict.PassAs<base::Value>()); | 77 settings_service_->UploadItem(key, dict.Pass()); |
| 78 | 78 |
| 79 callback.Run(true); | 79 callback.Run(true); |
| 80 } | 80 } |
| OLD | NEW |