| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/policy/core/common/policy_test_utils.h" | 5 #include "components/policy/core/common/policy_test_utils.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 std::ostream& operator<<(std::ostream& os, policy::PolicyDomain domain) { | 196 std::ostream& operator<<(std::ostream& os, policy::PolicyDomain domain) { |
| 197 switch (domain) { | 197 switch (domain) { |
| 198 case policy::POLICY_DOMAIN_CHROME: { | 198 case policy::POLICY_DOMAIN_CHROME: { |
| 199 os << "POLICY_DOMAIN_CHROME"; | 199 os << "POLICY_DOMAIN_CHROME"; |
| 200 break; | 200 break; |
| 201 } | 201 } |
| 202 case policy::POLICY_DOMAIN_EXTENSIONS: { | 202 case policy::POLICY_DOMAIN_EXTENSIONS: { |
| 203 os << "POLICY_DOMAIN_EXTENSIONS"; | 203 os << "POLICY_DOMAIN_EXTENSIONS"; |
| 204 break; | 204 break; |
| 205 } | 205 } |
| 206 case policy::POLICY_DOMAIN_SIGNIN_EXTENSIONS: { |
| 207 os << "POLICY_DOMAIN_SIGNIN_EXTENSIONS"; |
| 208 break; |
| 209 } |
| 206 default: { | 210 default: { |
| 207 os << "POLICY_DOMAIN_UNKNOWN(" << int(domain) << ")"; | 211 os << "POLICY_DOMAIN_UNKNOWN(" << int(domain) << ")"; |
| 208 } | 212 } |
| 209 } | 213 } |
| 210 return os; | 214 return os; |
| 211 } | 215 } |
| 212 | 216 |
| 213 std::ostream& operator<<(std::ostream& os, const policy::PolicyMap& policies) { | 217 std::ostream& operator<<(std::ostream& os, const policy::PolicyMap& policies) { |
| 214 os << "{" << std::endl; | 218 os << "{" << std::endl; |
| 215 for (policy::PolicyMap::const_iterator iter = policies.begin(); | 219 for (policy::PolicyMap::const_iterator iter = policies.begin(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 229 << " \"scope\": " << e.scope << "," << std::endl | 233 << " \"scope\": " << e.scope << "," << std::endl |
| 230 << " \"value\": " << value | 234 << " \"value\": " << value |
| 231 << "}"; | 235 << "}"; |
| 232 return os; | 236 return os; |
| 233 } | 237 } |
| 234 | 238 |
| 235 std::ostream& operator<<(std::ostream& os, const policy::PolicyNamespace& ns) { | 239 std::ostream& operator<<(std::ostream& os, const policy::PolicyNamespace& ns) { |
| 236 os << ns.domain << "/" << ns.component_id; | 240 os << ns.domain << "/" << ns.component_id; |
| 237 return os; | 241 return os; |
| 238 } | 242 } |
| OLD | NEW |