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

Side by Side Diff: chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc

Issue 608283003: Remove retail mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/policy/device_cloud_policy_store_chromeos.h" 5 #include "chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/sequenced_task_runner.h" 10 #include "base/sequenced_task_runner.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 switch (status) { 185 switch (status) {
186 case chromeos::DeviceSettingsService::STORE_SUCCESS: { 186 case chromeos::DeviceSettingsService::STORE_SUCCESS: {
187 status_ = STATUS_OK; 187 status_ = STATUS_OK;
188 policy_.reset(new em::PolicyData()); 188 policy_.reset(new em::PolicyData());
189 if (device_settings_service_->policy_data()) 189 if (device_settings_service_->policy_data())
190 policy_->MergeFrom(*device_settings_service_->policy_data()); 190 policy_->MergeFrom(*device_settings_service_->policy_data());
191 191
192 PolicyMap new_policy_map; 192 PolicyMap new_policy_map;
193 if (is_managed()) { 193 if (is_managed()) {
194 DecodeDevicePolicy(*device_settings_service_->device_settings(), 194 DecodeDevicePolicy(*device_settings_service_->device_settings(),
195 &new_policy_map, install_attributes_); 195 &new_policy_map);
196 } 196 }
197 policy_map_.Swap(&new_policy_map); 197 policy_map_.Swap(&new_policy_map);
198 198
199 NotifyStoreLoaded(); 199 NotifyStoreLoaded();
200 return; 200 return;
201 } 201 }
202 case chromeos::DeviceSettingsService::STORE_KEY_UNAVAILABLE: 202 case chromeos::DeviceSettingsService::STORE_KEY_UNAVAILABLE:
203 status_ = STATUS_BAD_STATE; 203 status_ = STATUS_BAD_STATE;
204 break; 204 break;
205 case chromeos::DeviceSettingsService::STORE_POLICY_ERROR: 205 case chromeos::DeviceSettingsService::STORE_POLICY_ERROR:
206 case chromeos::DeviceSettingsService::STORE_OPERATION_FAILED: 206 case chromeos::DeviceSettingsService::STORE_OPERATION_FAILED:
207 status_ = STATUS_STORE_ERROR; 207 status_ = STATUS_STORE_ERROR;
208 break; 208 break;
209 case chromeos::DeviceSettingsService::STORE_NO_POLICY: 209 case chromeos::DeviceSettingsService::STORE_NO_POLICY:
210 case chromeos::DeviceSettingsService::STORE_INVALID_POLICY: 210 case chromeos::DeviceSettingsService::STORE_INVALID_POLICY:
211 case chromeos::DeviceSettingsService::STORE_VALIDATION_ERROR: 211 case chromeos::DeviceSettingsService::STORE_VALIDATION_ERROR:
212 case chromeos::DeviceSettingsService::STORE_TEMP_VALIDATION_ERROR: 212 case chromeos::DeviceSettingsService::STORE_TEMP_VALIDATION_ERROR:
213 status_ = STATUS_LOAD_ERROR; 213 status_ = STATUS_LOAD_ERROR;
214 break; 214 break;
215 } 215 }
216 216
217 NotifyStoreError(); 217 NotifyStoreError();
218 } 218 }
219 219
220 } // namespace policy 220 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698