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

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

Issue 781623003: Fix Chrome OS enrollment with SAML accounts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
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 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...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("chrome")
201 .AppendASCII("browser")
202 .AppendASCII("policy")
203 .AppendASCII("proto")
204 .AppendASCII("cloud"));
205 AppendToPythonPath(pyproto_dir
206 .AppendASCII("policy") 200 .AppendASCII("policy")
207 .AppendASCII("proto")); 201 .AppendASCII("proto"));
208 #if defined(OS_CHROMEOS) 202 #if defined(OS_CHROMEOS)
209 AppendToPythonPath(pyproto_dir 203 AppendToPythonPath(pyproto_dir
210 .AppendASCII("chrome") 204 .AppendASCII("chrome")
211 .AppendASCII("browser") 205 .AppendASCII("browser")
206 .AppendASCII("chromeos")
212 .AppendASCII("policy") 207 .AppendASCII("policy")
213 .AppendASCII("proto") 208 .AppendASCII("proto"));
Mattias Nissler (ping if slow) 2014/12/04 19:46:02 Ha, I'm surprised this only gets noticed now...
bartfab (slow) 2014/12/05 12:34:36 I guess this is a tribute to YAPS' popularity.
Mattias Nissler (ping if slow) 2014/12/05 13:07:09 Not really, I'm surprised that no tests failed bec
214 .AppendASCII("chromeos"));
215 #endif 209 #endif
216 210
217 return true; 211 return true;
218 } 212 }
219 213
220 bool LocalPolicyTestServer::GetTestServerPath( 214 bool LocalPolicyTestServer::GetTestServerPath(
221 base::FilePath* testserver_path) const { 215 base::FilePath* testserver_path) const {
222 base::FilePath source_root; 216 base::FilePath source_root;
223 if (!PathService::Get(base::DIR_SOURCE_ROOT, &source_root)) { 217 if (!PathService::Get(base::DIR_SOURCE_ROOT, &source_root)) {
224 LOG(ERROR) << "Failed to get DIR_SOURCE_ROOT"; 218 LOG(ERROR) << "Failed to get DIR_SOURCE_ROOT";
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 std::string LocalPolicyTestServer::GetSelector(const std::string& type, 257 std::string LocalPolicyTestServer::GetSelector(const std::string& type,
264 const std::string& entity_id) { 258 const std::string& entity_id) {
265 std::string selector = type; 259 std::string selector = type;
266 if (!entity_id.empty()) 260 if (!entity_id.empty())
267 selector = base::StringPrintf("%s/%s", type.c_str(), entity_id.c_str()); 261 selector = base::StringPrintf("%s/%s", type.c_str(), entity_id.c_str());
268 std::replace_if(selector.begin(), selector.end(), IsUnsafeCharacter, '_'); 262 std::replace_if(selector.begin(), selector.end(), IsUnsafeCharacter, '_');
269 return selector; 263 return selector;
270 } 264 }
271 265
272 } // namespace policy 266 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698