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/browser/sync/test/integration/bookmarks_helper.h" | 5 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 for (int i = 0; i < sync_datatype_helper::test()->num_clients(); ++i) | 261 for (int i = 0; i < sync_datatype_helper::test()->num_clients(); ++i) |
262 profiles_which_need_to_wait.push_back( | 262 profiles_which_need_to_wait.push_back( |
263 sync_datatype_helper::test()->GetProfile(i)); | 263 sync_datatype_helper::test()->GetProfile(i)); |
264 | 264 |
265 for (size_t i = 0; i < profiles_which_need_to_wait.size(); ++i) { | 265 for (size_t i = 0; i < profiles_which_need_to_wait.size(); ++i) { |
266 Profile* profile = profiles_which_need_to_wait[i]; | 266 Profile* profile = profiles_which_need_to_wait[i]; |
267 HistoryService* history_service = | 267 HistoryService* history_service = |
268 HistoryServiceFactory::GetForProfileWithoutCreating(profile); | 268 HistoryServiceFactory::GetForProfileWithoutCreating(profile); |
269 base::WaitableEvent done(false, false); | 269 base::WaitableEvent done(false, false); |
270 base::CancelableTaskTracker task_tracker; | 270 base::CancelableTaskTracker task_tracker; |
271 history_service->ScheduleDBTask( | 271 history_service->ScheduleDBTask(new HistoryEmptyTask(&done), &task_tracker); |
272 scoped_ptr<history::HistoryDBTask>( | |
273 new HistoryEmptyTask(&done)), | |
274 &task_tracker); | |
275 done.Wait(); | 272 done.Wait(); |
276 } | 273 } |
277 // Wait such that any notifications broadcast from one of the history threads | 274 // Wait such that any notifications broadcast from one of the history threads |
278 // to the UI thread are processed. | 275 // to the UI thread are processed. |
279 content::RunAllPendingInMessageLoop(); | 276 content::RunAllPendingInMessageLoop(); |
280 } | 277 } |
281 | 278 |
282 // Checks if the favicon in |node_a| from |model_a| matches that of |node_b| | 279 // Checks if the favicon in |node_a| from |model_a| matches that of |node_b| |
283 // from |model_b|. Returns true if they match. | 280 // from |model_b|. Returns true if they match. |
284 bool FaviconsMatch(BookmarkModel* model_a, | 281 bool FaviconsMatch(BookmarkModel* model_a, |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 | 813 |
817 std::string IndexedSubfolderName(int i) { | 814 std::string IndexedSubfolderName(int i) { |
818 return base::StringPrintf("Subfolder Name %d", i); | 815 return base::StringPrintf("Subfolder Name %d", i); |
819 } | 816 } |
820 | 817 |
821 std::string IndexedSubsubfolderName(int i) { | 818 std::string IndexedSubsubfolderName(int i) { |
822 return base::StringPrintf("Subsubfolder Name %d", i); | 819 return base::StringPrintf("Subsubfolder Name %d", i); |
823 } | 820 } |
824 | 821 |
825 } // namespace bookmarks_helper | 822 } // namespace bookmarks_helper |
OLD | NEW |