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

Side by Side Diff: chrome/browser/policy/test/local_policy_test_server.cc

Issue 12189011: Split up chrome/browser/policy subdirectory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, add chrome/browser/chromeos/policy/OWNERS Created 7 years, 9 months 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 | Annotate | Revision Log
OLDNEW
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 <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
11 #include "base/json/json_writer.h" 11 #include "base/json/json_writer.h"
12 #include "base/path_service.h" 12 #include "base/path_service.h"
13 #include "base/stl_util.h" 13 #include "base/stl_util.h"
14 #include "base/stringprintf.h" 14 #include "base/stringprintf.h"
15 #include "chrome/browser/policy/cloud_policy_constants.h" 15 #include "chrome/browser/policy/cloud/cloud_policy_constants.h"
16 #include "chrome/common/chrome_paths.h" 16 #include "chrome/common/chrome_paths.h"
17 #include "crypto/rsa_private_key.h" 17 #include "crypto/rsa_private_key.h"
18 #include "net/test/base_test_server.h" 18 #include "net/test/base_test_server.h"
19 #include "net/test/python_utils.h" 19 #include "net/test/python_utils.h"
20 20
21 namespace policy { 21 namespace policy {
22 22
23 namespace { 23 namespace {
24 24
25 // Filename in the temporary directory storing the policy data. 25 // Filename in the temporary directory storing the policy data.
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 std::string LocalPolicyTestServer::GetSelector(const std::string& type, 228 std::string LocalPolicyTestServer::GetSelector(const std::string& type,
229 const std::string& entity_id) { 229 const std::string& entity_id) {
230 std::string selector = type; 230 std::string selector = type;
231 if (!entity_id.empty()) 231 if (!entity_id.empty())
232 selector = base::StringPrintf("%s/%s", type.c_str(), entity_id.c_str()); 232 selector = base::StringPrintf("%s/%s", type.c_str(), entity_id.c_str());
233 std::replace_if(selector.begin(), selector.end(), IsUnsafeCharacter, '_'); 233 std::replace_if(selector.begin(), selector.end(), IsUnsafeCharacter, '_');
234 return selector; 234 return selector;
235 } 235 }
236 236
237 } // namespace policy; 237 } // namespace policy;
OLDNEW
« no previous file with comments | « chrome/browser/policy/resource_cache_unittest.cc ('k') | chrome/browser/policy/test_request_interceptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698