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

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

Issue 654263003: Implemented OwnerSettingsService::Set() method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed crashes under asan. Created 6 years, 1 month 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 void DeviceCloudPolicyStoreChromeOS::OwnershipStatusChanged() { 92 void DeviceCloudPolicyStoreChromeOS::OwnershipStatusChanged() {
93 // Nothing to do. 93 // Nothing to do.
94 } 94 }
95 95
96 void DeviceCloudPolicyStoreChromeOS::DeviceSettingsUpdated() { 96 void DeviceCloudPolicyStoreChromeOS::DeviceSettingsUpdated() {
97 if (!weak_factory_.HasWeakPtrs()) 97 if (!weak_factory_.HasWeakPtrs())
98 UpdateFromService(); 98 UpdateFromService();
99 } 99 }
100 100
101 void DeviceCloudPolicyStoreChromeOS::OnDeviceSettingsServiceShutdown() {
102 device_settings_service_ = nullptr;
103 }
104
101 scoped_ptr<DeviceCloudPolicyValidator> 105 scoped_ptr<DeviceCloudPolicyValidator>
102 DeviceCloudPolicyStoreChromeOS::CreateValidator( 106 DeviceCloudPolicyStoreChromeOS::CreateValidator(
103 const em::PolicyFetchResponse& policy) { 107 const em::PolicyFetchResponse& policy) {
104 scoped_ptr<DeviceCloudPolicyValidator> validator( 108 scoped_ptr<DeviceCloudPolicyValidator> validator(
105 DeviceCloudPolicyValidator::Create( 109 DeviceCloudPolicyValidator::Create(
106 scoped_ptr<em::PolicyFetchResponse>( 110 scoped_ptr<em::PolicyFetchResponse>(
107 new em::PolicyFetchResponse(policy)), 111 new em::PolicyFetchResponse(policy)),
108 background_task_runner_)); 112 background_task_runner_));
109 validator->ValidateDomain(install_attributes_->GetDomain()); 113 validator->ValidateDomain(install_attributes_->GetDomain());
110 validator->ValidatePolicyType(dm_protocol::kChromeDevicePolicyType); 114 validator->ValidatePolicyType(dm_protocol::kChromeDevicePolicyType);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 case chromeos::DeviceSettingsService::STORE_VALIDATION_ERROR: 211 case chromeos::DeviceSettingsService::STORE_VALIDATION_ERROR:
208 case chromeos::DeviceSettingsService::STORE_TEMP_VALIDATION_ERROR: 212 case chromeos::DeviceSettingsService::STORE_TEMP_VALIDATION_ERROR:
209 status_ = STATUS_LOAD_ERROR; 213 status_ = STATUS_LOAD_ERROR;
210 break; 214 break;
211 } 215 }
212 216
213 NotifyStoreError(); 217 NotifyStoreError();
214 } 218 }
215 219
216 } // namespace policy 220 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698