OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/test/base/ui_test_utils.h" | 5 #include "chrome/test/base/ui_test_utils.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 // root. | 350 // root. |
351 base::FilePath exe_dir = | 351 base::FilePath exe_dir = |
352 CommandLine::ForCurrentProcess()->GetProgram().DirName(); | 352 CommandLine::ForCurrentProcess()->GetProgram().DirName(); |
353 base::FilePath src_dir; | 353 base::FilePath src_dir; |
354 if (!PathService::Get(base::DIR_SOURCE_ROOT, &src_dir)) | 354 if (!PathService::Get(base::DIR_SOURCE_ROOT, &src_dir)) |
355 return false; | 355 return false; |
356 | 356 |
357 // We must first generate absolute paths to SRC and EXE and from there | 357 // We must first generate absolute paths to SRC and EXE and from there |
358 // generate a relative path. | 358 // generate a relative path. |
359 if (!exe_dir.IsAbsolute()) | 359 if (!exe_dir.IsAbsolute()) |
360 file_util::AbsolutePath(&exe_dir); | 360 exe_dir = base::MakeAbsoluteFilePath(exe_dir); |
361 if (!src_dir.IsAbsolute()) | 361 if (!src_dir.IsAbsolute()) |
362 file_util::AbsolutePath(&src_dir); | 362 src_dir = base::MakeAbsoluteFilePath(src_dir); |
363 if (!exe_dir.IsAbsolute()) | 363 if (!exe_dir.IsAbsolute()) |
364 return false; | 364 return false; |
365 if (!src_dir.IsAbsolute()) | 365 if (!src_dir.IsAbsolute()) |
366 return false; | 366 return false; |
367 | 367 |
368 size_t match, exe_size, src_size; | 368 size_t match, exe_size, src_size; |
369 std::vector<base::FilePath::StringType> src_parts, exe_parts; | 369 std::vector<base::FilePath::StringType> src_parts, exe_parts; |
370 | 370 |
371 // Determine point at which src and exe diverge. | 371 // Determine point at which src and exe diverge. |
372 exe_dir.GetComponents(&exe_parts); | 372 exe_dir.GetComponents(&exe_parts); |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 void HistoryEnumerator::HistoryQueryComplete( | 688 void HistoryEnumerator::HistoryQueryComplete( |
689 const base::Closure& quit_task, | 689 const base::Closure& quit_task, |
690 HistoryService::Handle request_handle, | 690 HistoryService::Handle request_handle, |
691 history::QueryResults* results) { | 691 history::QueryResults* results) { |
692 for (size_t i = 0; i < results->size(); ++i) | 692 for (size_t i = 0; i < results->size(); ++i) |
693 urls_.push_back((*results)[i].url()); | 693 urls_.push_back((*results)[i].url()); |
694 quit_task.Run(); | 694 quit_task.Run(); |
695 } | 695 } |
696 | 696 |
697 } // namespace ui_test_utils | 697 } // namespace ui_test_utils |
OLD | NEW |