| 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 <map> | 5 #include <map> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/location.h" | 12 #include "base/location.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
| 15 #include "base/scoped_temp_dir.h" | 15 #include "base/scoped_temp_dir.h" |
| 16 #include "base/stl_util.h" | 16 #include "base/stl_util.h" |
| 17 #include "base/time.h" | 17 #include "base/time.h" |
| 18 #include "chrome/browser/signin/signin_manager.h" | 18 #include "chrome/browser/signin/signin_manager.h" |
| 19 #include "chrome/browser/signin/signin_manager_factory.h" | 19 #include "chrome/browser/signin/signin_manager_factory.h" |
| 20 #include "chrome/browser/signin/token_service_factory.h" | 20 #include "chrome/browser/signin/token_service_factory.h" |
| 21 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" | 21 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" |
| 22 #include "chrome/browser/sync/glue/session_change_processor.h" | 22 #include "chrome/browser/sync/glue/session_change_processor.h" |
| 23 #include "chrome/browser/sync/glue/session_data_type_controller.h" | 23 #include "chrome/browser/sync/glue/session_data_type_controller.h" |
| 24 #include "chrome/browser/sync/glue/session_model_associator.h" | 24 #include "chrome/browser/sync/glue/session_model_associator.h" |
| 25 #include "chrome/browser/sync/glue/sync_backend_host.h" | 25 #include "chrome/browser/sync/glue/sync_backend_host.h" |
| 26 #include "chrome/browser/sync/internal_api/change_record.h" | 26 #include "chrome/browser/sync/internal_api/change_record.h" |
| 27 #include "chrome/browser/sync/internal_api/read_node.h" | 27 #include "chrome/browser/sync/internal_api/read_node.h" |
| 28 #include "chrome/browser/sync/internal_api/read_transaction.h" |
| 28 #include "chrome/browser/sync/internal_api/write_node.h" | 29 #include "chrome/browser/sync/internal_api/write_node.h" |
| 29 #include "chrome/browser/sync/internal_api/read_transaction.h" | |
| 30 #include "chrome/browser/sync/internal_api/write_transaction.h" | 30 #include "chrome/browser/sync/internal_api/write_transaction.h" |
| 31 #include "chrome/browser/sync/profile_sync_components_factory_mock.h" | 31 #include "chrome/browser/sync/profile_sync_components_factory_mock.h" |
| 32 #include "chrome/browser/sync/profile_sync_service_factory.h" | 32 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 33 #include "chrome/browser/sync/profile_sync_test_util.h" | 33 #include "chrome/browser/sync/profile_sync_test_util.h" |
| 34 #include "chrome/browser/sync/syncable/model_type.h" | |
| 35 #include "chrome/browser/sync/syncable/syncable.h" | |
| 36 #include "chrome/browser/sync/test/engine/test_id_factory.h" | |
| 37 #include "chrome/browser/sync/test_profile_sync_service.h" | 34 #include "chrome/browser/sync/test_profile_sync_service.h" |
| 38 #include "chrome/common/chrome_notification_types.h" | 35 #include "chrome/common/chrome_notification_types.h" |
| 39 #include "chrome/common/net/gaia/gaia_constants.h" | 36 #include "chrome/common/net/gaia/gaia_constants.h" |
| 40 #include "chrome/test/base/browser_with_test_window_test.h" | 37 #include "chrome/test/base/browser_with_test_window_test.h" |
| 41 #include "chrome/test/base/profile_mock.h" | 38 #include "chrome/test/base/profile_mock.h" |
| 42 #include "chrome/test/base/testing_profile.h" | 39 #include "chrome/test/base/testing_profile.h" |
| 43 #include "content/public/browser/navigation_entry.h" | 40 #include "content/public/browser/navigation_entry.h" |
| 44 #include "content/public/browser/notification_observer.h" | 41 #include "content/public/browser/notification_observer.h" |
| 45 #include "content/public/browser/notification_registrar.h" | 42 #include "content/public/browser/notification_registrar.h" |
| 46 #include "content/public/browser/notification_service.h" | 43 #include "content/public/browser/notification_service.h" |
| 47 #include "content/test/test_browser_thread.h" | 44 #include "content/test/test_browser_thread.h" |
| 48 #include "googleurl/src/gurl.h" | 45 #include "googleurl/src/gurl.h" |
| 49 #include "sync/protocol/session_specifics.pb.h" | 46 #include "sync/protocol/session_specifics.pb.h" |
| 50 #include "sync/protocol/sync.pb.h" | 47 #include "sync/protocol/sync.pb.h" |
| 48 #include "sync/syncable/model_type.h" |
| 49 #include "sync/syncable/syncable.h" |
| 50 #include "sync/test/engine/test_id_factory.h" |
| 51 #include "testing/gmock/include/gmock/gmock.h" | 51 #include "testing/gmock/include/gmock/gmock.h" |
| 52 #include "testing/gtest/include/gtest/gtest.h" | 52 #include "testing/gtest/include/gtest/gtest.h" |
| 53 #include "ui/base/ui_base_types.h" | 53 #include "ui/base/ui_base_types.h" |
| 54 | 54 |
| 55 using browser_sync::SessionChangeProcessor; | 55 using browser_sync::SessionChangeProcessor; |
| 56 using browser_sync::SessionDataTypeController; | 56 using browser_sync::SessionDataTypeController; |
| 57 using browser_sync::SessionModelAssociator; | 57 using browser_sync::SessionModelAssociator; |
| 58 using browser_sync::SyncBackendHost; | 58 using browser_sync::SyncBackendHost; |
| 59 using content::BrowserThread; | 59 using content::BrowserThread; |
| 60 using sync_api::ChangeRecord; | 60 using sync_api::ChangeRecord; |
| (...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1093 root, foreign_tag)); | 1093 root, foreign_tag)); |
| 1094 sync_pb::SessionSpecifics specifics; | 1094 sync_pb::SessionSpecifics specifics; |
| 1095 specifics.set_session_tag(foreign_tag); | 1095 specifics.set_session_tag(foreign_tag); |
| 1096 extra_header.SetSessionSpecifics(specifics); | 1096 extra_header.SetSessionSpecifics(specifics); |
| 1097 } | 1097 } |
| 1098 ASSERT_TRUE(model_associator_->AssociateModels(&error)); | 1098 ASSERT_TRUE(model_associator_->AssociateModels(&error)); |
| 1099 ASSERT_FALSE(error.IsSet()); | 1099 ASSERT_FALSE(error.IsSet()); |
| 1100 } | 1100 } |
| 1101 | 1101 |
| 1102 } // namespace browser_sync | 1102 } // namespace browser_sync |
| OLD | NEW |