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

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

Issue 2417133002: [M54] Merge Linux ChromeOS Buildspec browsertest fix (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <ctype.h> 7 #include <ctype.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 .AppendASCII("python")); 190 .AppendASCII("python"));
191 191
192 // Add the generated python protocol buffer bindings. 192 // Add the generated python protocol buffer bindings.
193 base::FilePath pyproto_dir; 193 base::FilePath pyproto_dir;
194 if (!GetPyProtoPath(&pyproto_dir)) { 194 if (!GetPyProtoPath(&pyproto_dir)) {
195 LOG(ERROR) << "Cannot find pyproto dir for generated code."; 195 LOG(ERROR) << "Cannot find pyproto dir for generated code.";
196 return false; 196 return false;
197 } 197 }
198 198
199 AppendToPythonPath(pyproto_dir 199 AppendToPythonPath(pyproto_dir
200 .AppendASCII("components")
200 .AppendASCII("policy") 201 .AppendASCII("policy")
201 .AppendASCII("proto")); 202 .AppendASCII("proto"));
202 #if defined(OS_CHROMEOS) 203 #if defined(OS_CHROMEOS)
203 AppendToPythonPath(pyproto_dir 204 AppendToPythonPath(pyproto_dir
204 .AppendASCII("chrome") 205 .AppendASCII("chrome")
205 .AppendASCII("browser") 206 .AppendASCII("browser")
206 .AppendASCII("chromeos") 207 .AppendASCII("chromeos")
207 .AppendASCII("policy") 208 .AppendASCII("policy")
208 .AppendASCII("proto")); 209 .AppendASCII("proto"));
209 #endif 210 #endif
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 std::string LocalPolicyTestServer::GetSelector(const std::string& type, 258 std::string LocalPolicyTestServer::GetSelector(const std::string& type,
258 const std::string& entity_id) { 259 const std::string& entity_id) {
259 std::string selector = type; 260 std::string selector = type;
260 if (!entity_id.empty()) 261 if (!entity_id.empty())
261 selector = base::StringPrintf("%s/%s", type.c_str(), entity_id.c_str()); 262 selector = base::StringPrintf("%s/%s", type.c_str(), entity_id.c_str());
262 std::replace_if(selector.begin(), selector.end(), IsUnsafeCharacter, '_'); 263 std::replace_if(selector.begin(), selector.end(), IsUnsafeCharacter, '_');
263 return selector; 264 return selector;
264 } 265 }
265 266
266 } // namespace policy 267 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698