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

Side by Side Diff: chrome/browser/supervised_user/permission_request_creator_sync.cc

Issue 660873002: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
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
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(&notifications_enabled); 72 bool success = value->GetAsBoolean(&notifications_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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698