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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 profiles_which_need_to_wait.push_back( | 313 profiles_which_need_to_wait.push_back( |
314 sync_datatype_helper::test()->GetProfile(i)); | 314 sync_datatype_helper::test()->GetProfile(i)); |
315 | 315 |
316 for (size_t i = 0; i < profiles_which_need_to_wait.size(); ++i) { | 316 for (size_t i = 0; i < profiles_which_need_to_wait.size(); ++i) { |
317 Profile* profile = profiles_which_need_to_wait[i]; | 317 Profile* profile = profiles_which_need_to_wait[i]; |
318 history::HistoryService* history_service = | 318 history::HistoryService* history_service = |
319 HistoryServiceFactory::GetForProfileWithoutCreating(profile); | 319 HistoryServiceFactory::GetForProfileWithoutCreating(profile); |
320 base::WaitableEvent done(false, false); | 320 base::WaitableEvent done(false, false); |
321 base::CancelableTaskTracker task_tracker; | 321 base::CancelableTaskTracker task_tracker; |
322 history_service->ScheduleDBTask( | 322 history_service->ScheduleDBTask( |
323 scoped_ptr<history::HistoryDBTask>( | 323 std::unique_ptr<history::HistoryDBTask>(new HistoryEmptyTask(&done)), |
324 new HistoryEmptyTask(&done)), | |
325 &task_tracker); | 324 &task_tracker); |
326 done.Wait(); | 325 done.Wait(); |
327 } | 326 } |
328 // Wait such that any notifications broadcast from one of the history threads | 327 // Wait such that any notifications broadcast from one of the history threads |
329 // to the UI thread are processed. | 328 // to the UI thread are processed. |
330 content::RunAllPendingInMessageLoop(); | 329 content::RunAllPendingInMessageLoop(); |
331 } | 330 } |
332 | 331 |
333 // Checks if the favicon in |node_a| from |model_a| matches that of |node_b| | 332 // Checks if the favicon in |node_a| from |model_a| matches that of |node_b| |
334 // from |model_b|. Returns true if they match. | 333 // from |model_b|. Returns true if they match. |
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1001 | 1000 |
1002 std::string IndexedSubfolderName(int i) { | 1001 std::string IndexedSubfolderName(int i) { |
1003 return base::StringPrintf("Subfolder Name %d", i); | 1002 return base::StringPrintf("Subfolder Name %d", i); |
1004 } | 1003 } |
1005 | 1004 |
1006 std::string IndexedSubsubfolderName(int i) { | 1005 std::string IndexedSubsubfolderName(int i) { |
1007 return base::StringPrintf("Subsubfolder Name %d", i); | 1006 return base::StringPrintf("Subsubfolder Name %d", i); |
1008 } | 1007 } |
1009 | 1008 |
1010 } // namespace bookmarks_helper | 1009 } // namespace bookmarks_helper |
OLD | NEW |