| 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/typed_urls_helper.h" | 5 #include "chrome/browser/sync/test/integration/typed_urls_helper.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 11 #include "base/synchronization/waitable_event.h" | 11 #include "base/synchronization/waitable_event.h" |
| 12 #include "base/task/cancelable_task_tracker.h" | 12 #include "base/task/cancelable_task_tracker.h" |
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "chrome/browser/history/history_service_factory.h" | 14 #include "chrome/browser/history/history_service_factory.h" |
| 15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 16 #include "chrome/browser/sync/test/integration/multi_client_status_change_checke
r.h" | 16 #include "chrome/browser/sync/test/integration/multi_client_status_change_checke
r.h" |
| 17 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" | 17 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" |
| 18 #include "chrome/browser/sync/test/integration/sync_test.h" | 18 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 19 #include "components/history/core/browser/history_backend.h" | 19 #include "components/history/core/browser/history_backend.h" |
| 20 #include "components/history/core/browser/history_db_task.h" | 20 #include "components/history/core/browser/history_db_task.h" |
| 21 #include "components/history/core/browser/history_service.h" | 21 #include "components/history/core/browser/history_service.h" |
| 22 #include "components/history/core/browser/history_types.h" | |
| 23 | 22 |
| 24 using sync_datatype_helper::test; | 23 using sync_datatype_helper::test; |
| 25 | 24 |
| 26 namespace { | 25 namespace { |
| 27 | 26 |
| 28 class FlushHistoryDBQueueTask : public history::HistoryDBTask { | 27 class FlushHistoryDBQueueTask : public history::HistoryDBTask { |
| 29 public: | 28 public: |
| 30 explicit FlushHistoryDBQueueTask(base::WaitableEvent* event) | 29 explicit FlushHistoryDBQueueTask(base::WaitableEvent* event) |
| 31 : wait_event_(event) {} | 30 : wait_event_(event) {} |
| 32 bool RunOnDBThread(history::HistoryBackend* backend, | 31 bool RunOnDBThread(history::HistoryBackend* backend, |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 | 450 |
| 452 } // namespace | 451 } // namespace |
| 453 | 452 |
| 454 bool AwaitCheckAllProfilesHaveSameURLs() { | 453 bool AwaitCheckAllProfilesHaveSameURLs() { |
| 455 ProfilesHaveSameURLsChecker checker; | 454 ProfilesHaveSameURLsChecker checker; |
| 456 checker.Wait(); | 455 checker.Wait(); |
| 457 return !checker.TimedOut(); | 456 return !checker.TimedOut(); |
| 458 } | 457 } |
| 459 | 458 |
| 460 } // namespace typed_urls_helper | 459 } // namespace typed_urls_helper |
| OLD | NEW |