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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 position.timestamp = base::Time::Now(); | 495 position.timestamp = base::Time::Now(); |
496 content::GeolocationProvider::GetInstance()->OverrideLocationForTesting( | 496 content::GeolocationProvider::GetInstance()->OverrideLocationForTesting( |
497 position); | 497 position); |
498 } | 498 } |
499 | 499 |
500 HistoryEnumerator::HistoryEnumerator(Profile* profile) { | 500 HistoryEnumerator::HistoryEnumerator(Profile* profile) { |
501 scoped_refptr<content::MessageLoopRunner> message_loop_runner = | 501 scoped_refptr<content::MessageLoopRunner> message_loop_runner = |
502 new content::MessageLoopRunner; | 502 new content::MessageLoopRunner; |
503 | 503 |
504 HistoryService* hs = HistoryServiceFactory::GetForProfile( | 504 HistoryService* hs = HistoryServiceFactory::GetForProfile( |
505 profile, Profile::EXPLICIT_ACCESS); | 505 profile, ServiceAccessType::EXPLICIT_ACCESS); |
506 hs->QueryHistory(base::string16(), | 506 hs->QueryHistory(base::string16(), |
507 history::QueryOptions(), | 507 history::QueryOptions(), |
508 base::Bind(&HistoryEnumerator::HistoryQueryComplete, | 508 base::Bind(&HistoryEnumerator::HistoryQueryComplete, |
509 base::Unretained(this), | 509 base::Unretained(this), |
510 message_loop_runner->QuitClosure()), | 510 message_loop_runner->QuitClosure()), |
511 &tracker_); | 511 &tracker_); |
512 message_loop_runner->Run(); | 512 message_loop_runner->Run(); |
513 } | 513 } |
514 | 514 |
515 HistoryEnumerator::~HistoryEnumerator() {} | 515 HistoryEnumerator::~HistoryEnumerator() {} |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 new content::MessageLoopRunner; | 555 new content::MessageLoopRunner; |
556 WaitHistoryLoadedObserver observer(runner.get()); | 556 WaitHistoryLoadedObserver observer(runner.get()); |
557 ScopedObserver<HistoryService, history::HistoryServiceObserver> | 557 ScopedObserver<HistoryService, history::HistoryServiceObserver> |
558 scoped_observer(&observer); | 558 scoped_observer(&observer); |
559 scoped_observer.Add(history_service); | 559 scoped_observer.Add(history_service); |
560 runner->Run(); | 560 runner->Run(); |
561 } | 561 } |
562 } | 562 } |
563 | 563 |
564 } // namespace ui_test_utils | 564 } // namespace ui_test_utils |
OLD | NEW |