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

Side by Side Diff: chrome/common/chrome_paths.cc

Issue 8641002: Add chrome::DIR_LAYOUT_TESTS to PathService::Get (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Define chrome::DIR_LAYOUT_TESTS Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | chrome/test/ui/ui_layout_test.cc » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/common/chrome_paths.h" 5 #include "chrome/common/chrome_paths.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 break; 298 break;
299 case chrome::DIR_TEST_TOOLS: 299 case chrome::DIR_TEST_TOOLS:
300 if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur)) 300 if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur))
301 return false; 301 return false;
302 cur = cur.Append(FILE_PATH_LITERAL("chrome")); 302 cur = cur.Append(FILE_PATH_LITERAL("chrome"));
303 cur = cur.Append(FILE_PATH_LITERAL("tools")); 303 cur = cur.Append(FILE_PATH_LITERAL("tools"));
304 cur = cur.Append(FILE_PATH_LITERAL("test")); 304 cur = cur.Append(FILE_PATH_LITERAL("test"));
305 if (!file_util::PathExists(cur)) // We don't want to create this 305 if (!file_util::PathExists(cur)) // We don't want to create this
306 return false; 306 return false;
307 break; 307 break;
308 case chrome::DIR_LAYOUT_TESTS:
309 if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur))
310 return false;
311 cur = cur.Append(FILE_PATH_LITERAL("third_party"));
312 cur = cur.Append(FILE_PATH_LITERAL("WebKit"));
313 cur = cur.Append(FILE_PATH_LITERAL("LayoutTests"));
314 if (file_util::DirectoryExists(cur))
315 break;
316 if (!PathService::Get(chrome::DIR_TEST_DATA, &cur))
317 return false;
318 cur = cur.Append(FILE_PATH_LITERAL("layout_tests"));
319 cur = cur.Append(FILE_PATH_LITERAL("LayoutTests"));
320 break;
308 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) 321 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
309 case chrome::DIR_POLICY_FILES: { 322 case chrome::DIR_POLICY_FILES: {
310 #if defined(GOOGLE_CHROME_BUILD) 323 #if defined(GOOGLE_CHROME_BUILD)
311 cur = FilePath(FILE_PATH_LITERAL("/etc/opt/chrome/policies")); 324 cur = FilePath(FILE_PATH_LITERAL("/etc/opt/chrome/policies"));
312 #else 325 #else
313 cur = FilePath(FILE_PATH_LITERAL("/etc/chromium/policies")); 326 cur = FilePath(FILE_PATH_LITERAL("/etc/chromium/policies"));
314 #endif 327 #endif
315 break; 328 break;
316 } 329 }
317 #endif 330 #endif
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 return true; 406 return true;
394 } 407 }
395 408
396 // This cannot be done as a static initializer sadly since Visual Studio will 409 // This cannot be done as a static initializer sadly since Visual Studio will
397 // eliminate this object file if there is no direct entry point into it. 410 // eliminate this object file if there is no direct entry point into it.
398 void RegisterPathProvider() { 411 void RegisterPathProvider() {
399 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 412 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
400 } 413 }
401 414
402 } // namespace chrome 415 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | chrome/test/ui/ui_layout_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698