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

Side by Side Diff: chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc

Issue 1019283004: Switch to direct use of OwnerSettingsServiceChromeOS::Set() in tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify a bit. Created 5 years, 8 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/chromeos/ownership/owner_settings_service_chromeos.h" 5 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 return false; 167 return false;
168 168
169 case policy::MANAGEMENT_MODE_CONSUMER_MANAGED: 169 case policy::MANAGEMENT_MODE_CONSUMER_MANAGED:
170 // For consumer management unenrollment. 170 // For consumer management unenrollment.
171 return new_mode == policy::MANAGEMENT_MODE_LOCAL_OWNER; 171 return new_mode == policy::MANAGEMENT_MODE_LOCAL_OWNER;
172 } 172 }
173 173
174 NOTREACHED(); 174 NOTREACHED();
175 return false; 175 return false;
176 } 176 }
177
177 } // namespace 178 } // namespace
178 179
179 OwnerSettingsServiceChromeOS::ManagementSettings::ManagementSettings() { 180 OwnerSettingsServiceChromeOS::ManagementSettings::ManagementSettings() {
180 } 181 }
181 182
182 OwnerSettingsServiceChromeOS::ManagementSettings::~ManagementSettings() { 183 OwnerSettingsServiceChromeOS::ManagementSettings::~ManagementSettings() {
183 } 184 }
184 185
185 OwnerSettingsServiceChromeOS::OwnerSettingsServiceChromeOS( 186 OwnerSettingsServiceChromeOS::OwnerSettingsServiceChromeOS(
186 DeviceSettingsService* device_settings_service, 187 DeviceSettingsService* device_settings_service,
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 std::vector<OnManagementSettingsSetCallback> callbacks; 803 std::vector<OnManagementSettingsSetCallback> callbacks;
803 pending_management_settings_callbacks_.swap(callbacks); 804 pending_management_settings_callbacks_.swap(callbacks);
804 for (const auto& callback : callbacks) { 805 for (const auto& callback : callbacks) {
805 if (!callback.is_null()) 806 if (!callback.is_null())
806 callback.Run(success); 807 callback.Run(success);
807 } 808 }
808 StorePendingChanges(); 809 StorePendingChanges();
809 } 810 }
810 811
811 } // namespace chromeos 812 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698