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(new HistoryEmptyTask(&done), &task_tracker); | 271 history_service->ScheduleDBTask( |
| 272 scoped_ptr<history::HistoryDBTask>( |
| 273 new HistoryEmptyTask(&done)), |
| 274 &task_tracker); |
272 done.Wait(); | 275 done.Wait(); |
273 } | 276 } |
274 // Wait such that any notifications broadcast from one of the history threads | 277 // Wait such that any notifications broadcast from one of the history threads |
275 // to the UI thread are processed. | 278 // to the UI thread are processed. |
276 content::RunAllPendingInMessageLoop(); | 279 content::RunAllPendingInMessageLoop(); |
277 } | 280 } |
278 | 281 |
279 // Checks if the favicon in |node_a| from |model_a| matches that of |node_b| | 282 // Checks if the favicon in |node_a| from |model_a| matches that of |node_b| |
280 // from |model_b|. Returns true if they match. | 283 // from |model_b|. Returns true if they match. |
281 bool FaviconsMatch(BookmarkModel* model_a, | 284 bool FaviconsMatch(BookmarkModel* model_a, |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 | 816 |
814 std::string IndexedSubfolderName(int i) { | 817 std::string IndexedSubfolderName(int i) { |
815 return base::StringPrintf("Subfolder Name %d", i); | 818 return base::StringPrintf("Subfolder Name %d", i); |
816 } | 819 } |
817 | 820 |
818 std::string IndexedSubsubfolderName(int i) { | 821 std::string IndexedSubsubfolderName(int i) { |
819 return base::StringPrintf("Subsubfolder Name %d", i); | 822 return base::StringPrintf("Subsubfolder Name %d", i); |
820 } | 823 } |
821 | 824 |
822 } // namespace bookmarks_helper | 825 } // namespace bookmarks_helper |
OLD | NEW |