| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/browser/policy/test/local_policy_test_server.h" | 5 #include "chrome/browser/policy/test/local_policy_test_server.h" |
| 6 | 6 |
| 7 #include <ctype.h> | 7 #include <ctype.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/base_paths.h" | 12 #include "base/base_paths.h" |
| 13 #include "base/file_util.h" | 13 #include "base/files/file_util.h" |
| 14 #include "base/json/json_writer.h" | 14 #include "base/json/json_writer.h" |
| 15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
| 16 #include "base/stl_util.h" | 16 #include "base/stl_util.h" |
| 17 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
| 18 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | 18 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
| 19 #include "crypto/rsa_private_key.h" | 19 #include "crypto/rsa_private_key.h" |
| 20 #include "net/test/python_utils.h" | 20 #include "net/test/python_utils.h" |
| 21 #include "net/test/spawned_test_server/base_test_server.h" | 21 #include "net/test/spawned_test_server/base_test_server.h" |
| 22 | 22 |
| 23 namespace policy { | 23 namespace policy { |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 std::string LocalPolicyTestServer::GetSelector(const std::string& type, | 263 std::string LocalPolicyTestServer::GetSelector(const std::string& type, |
| 264 const std::string& entity_id) { | 264 const std::string& entity_id) { |
| 265 std::string selector = type; | 265 std::string selector = type; |
| 266 if (!entity_id.empty()) | 266 if (!entity_id.empty()) |
| 267 selector = base::StringPrintf("%s/%s", type.c_str(), entity_id.c_str()); | 267 selector = base::StringPrintf("%s/%s", type.c_str(), entity_id.c_str()); |
| 268 std::replace_if(selector.begin(), selector.end(), IsUnsafeCharacter, '_'); | 268 std::replace_if(selector.begin(), selector.end(), IsUnsafeCharacter, '_'); |
| 269 return selector; | 269 return selector; |
| 270 } | 270 } |
| 271 | 271 |
| 272 } // namespace policy | 272 } // namespace policy |
| OLD | NEW |