| 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 <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
| 13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
| 14 #include "base/rand_util.h" | 14 #include "base/rand_util.h" |
| 15 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
| 16 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
| 17 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
| 18 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" |
| 19 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
| 20 #include "base/synchronization/waitable_event.h" | 20 #include "base/synchronization/waitable_event.h" |
| 21 #include "base/task/cancelable_task_tracker.h" | 21 #include "base/task/cancelable_task_tracker.h" |
| 22 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 22 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 23 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" | 23 #include "chrome/browser/bookmarks/managed_bookmark_service_factory.h" |
| 24 #include "chrome/browser/bookmarks/chrome_bookmark_client_factory.h" | |
| 25 #include "chrome/browser/favicon/favicon_service_factory.h" | 24 #include "chrome/browser/favicon/favicon_service_factory.h" |
| 26 #include "chrome/browser/history/history_service_factory.h" | 25 #include "chrome/browser/history/history_service_factory.h" |
| 27 #include "chrome/browser/profiles/profile.h" | 26 #include "chrome/browser/profiles/profile.h" |
| 28 #include "chrome/browser/sync/glue/bookmark_change_processor.h" | 27 #include "chrome/browser/sync/glue/bookmark_change_processor.h" |
| 29 #include "chrome/browser/sync/test/integration/await_match_status_change_checker
.h" | 28 #include "chrome/browser/sync/test/integration/await_match_status_change_checker
.h" |
| 30 #include "chrome/browser/sync/test/integration/multi_client_status_change_checke
r.h" | 29 #include "chrome/browser/sync/test/integration/multi_client_status_change_checke
r.h" |
| 31 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" | 30 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" |
| 32 #include "chrome/browser/sync/test/integration/single_client_status_change_check
er.h" | 31 #include "chrome/browser/sync/test/integration/single_client_status_change_check
er.h" |
| 33 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" | 32 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" |
| 34 #include "chrome/browser/sync/test/integration/sync_test.h" | 33 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 35 #include "chrome/common/chrome_paths.h" | 34 #include "chrome/common/chrome_paths.h" |
| 36 #include "components/bookmarks/browser/bookmark_client.h" | 35 #include "components/bookmarks/browser/bookmark_client.h" |
| 37 #include "components/bookmarks/browser/bookmark_model.h" | 36 #include "components/bookmarks/browser/bookmark_model.h" |
| 38 #include "components/bookmarks/browser/bookmark_model_observer.h" | 37 #include "components/bookmarks/browser/bookmark_model_observer.h" |
| 39 #include "components/bookmarks/browser/bookmark_utils.h" | 38 #include "components/bookmarks/browser/bookmark_utils.h" |
| 39 #include "components/bookmarks/managed/managed_bookmark_service.h" |
| 40 #include "components/favicon/core/favicon_service.h" | 40 #include "components/favicon/core/favicon_service.h" |
| 41 #include "components/favicon_base/favicon_util.h" | 41 #include "components/favicon_base/favicon_util.h" |
| 42 #include "components/history/core/browser/history_db_task.h" | 42 #include "components/history/core/browser/history_db_task.h" |
| 43 #include "components/history/core/browser/history_service.h" | 43 #include "components/history/core/browser/history_service.h" |
| 44 #include "components/history/core/browser/history_types.h" | 44 #include "components/history/core/browser/history_types.h" |
| 45 #include "content/public/test/test_utils.h" | 45 #include "content/public/test/test_utils.h" |
| 46 #include "testing/gtest/include/gtest/gtest.h" | 46 #include "testing/gtest/include/gtest/gtest.h" |
| 47 #include "third_party/skia/include/core/SkBitmap.h" | 47 #include "third_party/skia/include/core/SkBitmap.h" |
| 48 #include "ui/base/models/tree_node_iterator.h" | 48 #include "ui/base/models/tree_node_iterator.h" |
| 49 #include "ui/gfx/image/image_skia.h" | 49 #include "ui/gfx/image/image_skia.h" |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 | 457 |
| 458 const BookmarkNode* GetOtherNode(int index) { | 458 const BookmarkNode* GetOtherNode(int index) { |
| 459 return GetBookmarkModel(index)->other_node(); | 459 return GetBookmarkModel(index)->other_node(); |
| 460 } | 460 } |
| 461 | 461 |
| 462 const BookmarkNode* GetSyncedBookmarksNode(int index) { | 462 const BookmarkNode* GetSyncedBookmarksNode(int index) { |
| 463 return GetBookmarkModel(index)->mobile_node(); | 463 return GetBookmarkModel(index)->mobile_node(); |
| 464 } | 464 } |
| 465 | 465 |
| 466 const BookmarkNode* GetManagedNode(int index) { | 466 const BookmarkNode* GetManagedNode(int index) { |
| 467 return ChromeBookmarkClientFactory::GetForProfile( | 467 return ManagedBookmarkServiceFactory::GetForProfile( |
| 468 sync_datatype_helper::test()->GetProfile(index))->managed_node(); | 468 sync_datatype_helper::test()->GetProfile(index))->managed_node(); |
| 469 } | 469 } |
| 470 | 470 |
| 471 BookmarkModel* GetVerifierBookmarkModel() { | 471 BookmarkModel* GetVerifierBookmarkModel() { |
| 472 return BookmarkModelFactory::GetForProfile( | 472 return BookmarkModelFactory::GetForProfile( |
| 473 sync_datatype_helper::test()->verifier()); | 473 sync_datatype_helper::test()->verifier()); |
| 474 } | 474 } |
| 475 | 475 |
| 476 const BookmarkNode* AddURL(int profile, | 476 const BookmarkNode* AddURL(int profile, |
| 477 const std::string& title, | 477 const std::string& title, |
| 478 const GURL& url) { | 478 const GURL& url) { |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 992 | 992 |
| 993 std::string IndexedSubfolderName(int i) { | 993 std::string IndexedSubfolderName(int i) { |
| 994 return base::StringPrintf("Subfolder Name %d", i); | 994 return base::StringPrintf("Subfolder Name %d", i); |
| 995 } | 995 } |
| 996 | 996 |
| 997 std::string IndexedSubsubfolderName(int i) { | 997 std::string IndexedSubsubfolderName(int i) { |
| 998 return base::StringPrintf("Subsubfolder Name %d", i); | 998 return base::StringPrintf("Subsubfolder Name %d", i); |
| 999 } | 999 } |
| 1000 | 1000 |
| 1001 } // namespace bookmarks_helper | 1001 } // namespace bookmarks_helper |
| OLD | NEW |