| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/login/signed_settings.h" | 5 #include "chrome/browser/chromeos/login/signed_settings.h" | 
| 6 | 6 | 
| 7 #include <string> | 7 #include <string> | 
| 8 #include <vector> | 8 #include <vector> | 
| 9 | 9 | 
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" | 
| (...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 745     return kVeritas[pol.data_roaming_enabled().data_roaming_enabled()]; | 745     return kVeritas[pol.data_roaming_enabled().data_roaming_enabled()]; | 
| 746 | 746 | 
| 747   } else if (prop == kSettingProxyEverywhere) { | 747   } else if (prop == kSettingProxyEverywhere) { | 
| 748     // TODO(cmasone): NOTIMPLEMENTED() once http://crosbug.com/13052 is fixed. | 748     // TODO(cmasone): NOTIMPLEMENTED() once http://crosbug.com/13052 is fixed. | 
| 749     std::string serialized; | 749     std::string serialized; | 
| 750     if (!pol.has_device_proxy_settings() || | 750     if (!pol.has_device_proxy_settings() || | 
| 751         !pol.device_proxy_settings().SerializeToString(&serialized)) | 751         !pol.device_proxy_settings().SerializeToString(&serialized)) | 
| 752       return "";           // Default to invalid proxy config (will be ignored). | 752       return "";           // Default to invalid proxy config (will be ignored). | 
| 753     return serialized; | 753     return serialized; | 
| 754 | 754 | 
|  | 755   } else if (prop == kReleaseChannel) { | 
|  | 756     if (!pol.has_release_channel() || | 
|  | 757         !pol.release_channel().has_release_channel()) | 
|  | 758       return "";           // Default: don't change the release channel | 
|  | 759     return pol.release_channel().release_channel(); | 
|  | 760 | 
| 755   } | 761   } | 
| 756   return std::string(); | 762   return std::string(); | 
| 757 } | 763 } | 
| 758 | 764 | 
| 759 void RetrievePropertyOp::PerformCallback(SignedSettings::ReturnCode code, | 765 void RetrievePropertyOp::PerformCallback(SignedSettings::ReturnCode code, | 
| 760                                          const std::string& value) { | 766                                          const std::string& value) { | 
| 761   d_->OnSettingsOpCompleted(code, value); | 767   d_->OnSettingsOpCompleted(code, value); | 
| 762 } | 768 } | 
| 763 | 769 | 
| 764 StorePolicyOp::StorePolicyOp(em::PolicyFetchResponse* policy, | 770 StorePolicyOp::StorePolicyOp(em::PolicyFetchResponse* policy, | 
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 927   sig.assign(sig_ptr, sig_ptr + policy_.policy_data_signature().length()); | 933   sig.assign(sig_ptr, sig_ptr + policy_.policy_data_signature().length()); | 
| 928   service_->StartVerifyAttempt(policy_.policy_data(), sig, this); | 934   service_->StartVerifyAttempt(policy_.policy_data(), sig, this); | 
| 929 } | 935 } | 
| 930 | 936 | 
| 931 void RetrievePolicyOp::PerformCallback(SignedSettings::ReturnCode code, | 937 void RetrievePolicyOp::PerformCallback(SignedSettings::ReturnCode code, | 
| 932                                        const em::PolicyFetchResponse& value) { | 938                                        const em::PolicyFetchResponse& value) { | 
| 933   d_->OnSettingsOpCompleted(code, value); | 939   d_->OnSettingsOpCompleted(code, value); | 
| 934 } | 940 } | 
| 935 | 941 | 
| 936 }  // namespace chromeos | 942 }  // namespace chromeos | 
| OLD | NEW | 
|---|