| 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/policy/device_management_backend_impl.h" | 5 #include "chrome/browser/policy/device_management_backend_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 params_.push_back(std::make_pair(name, value)); | 104 params_.push_back(std::make_pair(name, value)); |
| 105 } | 105 } |
| 106 | 106 |
| 107 std::string URLQueryParameters::Encode() { | 107 std::string URLQueryParameters::Encode() { |
| 108 std::string result; | 108 std::string result; |
| 109 for (ParameterMap::const_iterator entry(params_.begin()); | 109 for (ParameterMap::const_iterator entry(params_.begin()); |
| 110 entry != params_.end(); | 110 entry != params_.end(); |
| 111 ++entry) { | 111 ++entry) { |
| 112 if (entry != params_.begin()) | 112 if (entry != params_.begin()) |
| 113 result += '&'; | 113 result += '&'; |
| 114 result += EscapeQueryParamValue(entry->first, true); | 114 result += net::EscapeQueryParamValue(entry->first, true); |
| 115 result += '='; | 115 result += '='; |
| 116 result += EscapeQueryParamValue(entry->second, true); | 116 result += net::EscapeQueryParamValue(entry->second, true); |
| 117 } | 117 } |
| 118 return result; | 118 return result; |
| 119 } | 119 } |
| 120 | 120 |
| 121 } // namespace | 121 } // namespace |
| 122 | 122 |
| 123 // A base class containing the common code for the jobs created by the backend | 123 // A base class containing the common code for the jobs created by the backend |
| 124 // implementation. Subclasses provide custom code for handling actual register, | 124 // implementation. Subclasses provide custom code for handling actual register, |
| 125 // unregister, and policy jobs. | 125 // unregister, and policy jobs. |
| 126 class DeviceManagementJobBase | 126 class DeviceManagementJobBase |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 case CloudPolicyDataStore::USER_AFFILIATION_MANAGED: | 577 case CloudPolicyDataStore::USER_AFFILIATION_MANAGED: |
| 578 return kValueUserAffiliationManaged; | 578 return kValueUserAffiliationManaged; |
| 579 case CloudPolicyDataStore::USER_AFFILIATION_NONE: | 579 case CloudPolicyDataStore::USER_AFFILIATION_NONE: |
| 580 return kValueUserAffiliationNone; | 580 return kValueUserAffiliationNone; |
| 581 } | 581 } |
| 582 NOTREACHED(); | 582 NOTREACHED(); |
| 583 return kValueUserAffiliationNone; | 583 return kValueUserAffiliationNone; |
| 584 } | 584 } |
| 585 | 585 |
| 586 } // namespace policy | 586 } // namespace policy |
| OLD | NEW |