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

Side by Side Diff: chrome/test/base/testing_profile.cc

Issue 959343004: Move InMemoryURLIndex outside of history namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@in-memory-url-index
Patch Set: Rebase Created 5 years, 9 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
OLDNEW
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/testing_profile.h" 5 #include "chrome/test/base/testing_profile.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 WebDataServiceFactory::GetInstance()->SetTestingFactory( 641 WebDataServiceFactory::GetInstance()->SetTestingFactory(
642 this, BuildWebDataService); 642 this, BuildWebDataService);
643 } 643 }
644 644
645 void TestingProfile::BlockUntilHistoryIndexIsRefreshed() { 645 void TestingProfile::BlockUntilHistoryIndexIsRefreshed() {
646 // Only get the history service if it actually exists since the caller of the 646 // Only get the history service if it actually exists since the caller of the
647 // test should explicitly call CreateHistoryService to build it. 647 // test should explicitly call CreateHistoryService to build it.
648 HistoryService* history_service = 648 HistoryService* history_service =
649 HistoryServiceFactory::GetForProfileWithoutCreating(this); 649 HistoryServiceFactory::GetForProfileWithoutCreating(this);
650 DCHECK(history_service); 650 DCHECK(history_service);
651 history::InMemoryURLIndex* index = history_service->InMemoryIndex(); 651 InMemoryURLIndex* index = history_service->InMemoryIndex();
652 if (!index || index->restored()) 652 if (!index || index->restored())
653 return; 653 return;
654 base::RunLoop run_loop; 654 base::RunLoop run_loop;
655 HistoryIndexRestoreObserver observer( 655 HistoryIndexRestoreObserver observer(
656 content::GetQuitTaskForRunLoop(&run_loop)); 656 content::GetQuitTaskForRunLoop(&run_loop));
657 index->set_restore_cache_observer(&observer); 657 index->set_restore_cache_observer(&observer);
658 run_loop.Run(); 658 run_loop.Run();
659 index->set_restore_cache_observer(NULL); 659 index->set_restore_cache_observer(NULL);
660 DCHECK(index->restored()); 660 DCHECK(index->restored());
661 } 661 }
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 #if defined(ENABLE_EXTENSIONS) 1101 #if defined(ENABLE_EXTENSIONS)
1102 extension_policy_, 1102 extension_policy_,
1103 #endif 1103 #endif
1104 pref_service_.Pass(), 1104 pref_service_.Pass(),
1105 original_profile, 1105 original_profile,
1106 guest_session_, 1106 guest_session_,
1107 supervised_user_id_, 1107 supervised_user_id_,
1108 policy_service_.Pass(), 1108 policy_service_.Pass(),
1109 testing_factories_); 1109 testing_factories_);
1110 } 1110 }
OLDNEW
« no previous file with comments | « chrome/test/base/history_index_restore_observer.h ('k') | components/history/core/browser/history_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698