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/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
13 #include "base/guid.h" | 13 #include "base/guid.h" |
14 #include "base/location.h" | 14 #include "base/location.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
17 #include "base/stl_util.h" | 17 #include "base/stl_util.h" |
18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
19 #include "chrome/browser/chrome_notification_types.h" | 19 #include "chrome/browser/chrome_notification_types.h" |
20 #include "chrome/browser/invalidation/invalidation_service_factory.h" | 20 #include "chrome/browser/invalidation/invalidation_service_factory.h" |
21 #include "chrome/browser/sessions/session_tab_helper.h" | 21 #include "chrome/browser/sessions/session_tab_helper.h" |
22 #include "chrome/browser/signin/profile_oauth2_token_service.h" | 22 #include "chrome/browser/signin/profile_oauth2_token_service.h" |
23 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 23 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
24 #include "chrome/browser/signin/signin_manager.h" | 24 #include "chrome/browser/signin/signin_manager.h" |
25 #include "chrome/browser/signin/signin_manager_factory.h" | 25 #include "chrome/browser/signin/signin_manager_factory.h" |
26 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" | 26 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" |
27 #include "chrome/browser/sync/fake_oauth2_token_service.h" | 27 #include "chrome/browser/sync/fake_oauth2_token_service_for_sync.h" |
28 #include "chrome/browser/sync/glue/device_info.h" | 28 #include "chrome/browser/sync/glue/device_info.h" |
29 #include "chrome/browser/sync/glue/session_change_processor.h" | 29 #include "chrome/browser/sync/glue/session_change_processor.h" |
30 #include "chrome/browser/sync/glue/session_data_type_controller.h" | 30 #include "chrome/browser/sync/glue/session_data_type_controller.h" |
31 #include "chrome/browser/sync/glue/session_model_associator.h" | 31 #include "chrome/browser/sync/glue/session_model_associator.h" |
32 #include "chrome/browser/sync/glue/session_sync_test_helper.h" | 32 #include "chrome/browser/sync/glue/session_sync_test_helper.h" |
33 #include "chrome/browser/sync/glue/sync_backend_host.h" | 33 #include "chrome/browser/sync/glue/sync_backend_host.h" |
34 #include "chrome/browser/sync/glue/synced_device_tracker.h" | 34 #include "chrome/browser/sync/glue/synced_device_tracker.h" |
35 #include "chrome/browser/sync/glue/synced_tab_delegate.h" | 35 #include "chrome/browser/sync/glue/synced_tab_delegate.h" |
36 #include "chrome/browser/sync/glue/tab_node_pool.h" | 36 #include "chrome/browser/sync/glue/tab_node_pool.h" |
37 #include "chrome/browser/sync/profile_sync_components_factory_mock.h" | 37 #include "chrome/browser/sync/profile_sync_components_factory_mock.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 ProfileSyncServiceSessionTest() | 124 ProfileSyncServiceSessionTest() |
125 : window_bounds_(0, 1, 2, 3), | 125 : window_bounds_(0, 1, 2, 3), |
126 notified_of_refresh_(false), | 126 notified_of_refresh_(false), |
127 notified_of_update_(false) {} | 127 notified_of_update_(false) {} |
128 ProfileSyncService* sync_service() { return sync_service_.get(); } | 128 ProfileSyncService* sync_service() { return sync_service_.get(); } |
129 | 129 |
130 protected: | 130 protected: |
131 virtual TestingProfile* CreateProfile() OVERRIDE { | 131 virtual TestingProfile* CreateProfile() OVERRIDE { |
132 TestingProfile::Builder builder; | 132 TestingProfile::Builder builder; |
133 builder.AddTestingFactory(ProfileOAuth2TokenServiceFactory::GetInstance(), | 133 builder.AddTestingFactory(ProfileOAuth2TokenServiceFactory::GetInstance(), |
134 FakeOAuth2TokenService::BuildTokenService); | 134 FakeOAuth2TokenServiceForSync::BuildTokenService); |
135 // Don't want the profile to create a real ProfileSyncService. | 135 // Don't want the profile to create a real ProfileSyncService. |
136 builder.AddTestingFactory(ProfileSyncServiceFactory::GetInstance(), NULL); | 136 builder.AddTestingFactory(ProfileSyncServiceFactory::GetInstance(), NULL); |
137 scoped_ptr<TestingProfile> profile(builder.Build()); | 137 scoped_ptr<TestingProfile> profile(builder.Build()); |
138 invalidation::InvalidationServiceFactory::GetInstance()-> | 138 invalidation::InvalidationServiceFactory::GetInstance()-> |
139 SetBuildOnlyFakeInvalidatorsForTest(true); | 139 SetBuildOnlyFakeInvalidatorsForTest(true); |
140 return profile.release(); | 140 return profile.release(); |
141 } | 141 } |
142 | 142 |
143 virtual void SetUp() { | 143 virtual void SetUp() { |
144 // BrowserWithTestWindowTest implementation. | 144 // BrowserWithTestWindowTest implementation. |
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1278 tab_node.SetSessionSpecifics(specifics); | 1278 tab_node.SetSessionSpecifics(specifics); |
1279 } | 1279 } |
1280 | 1280 |
1281 error = model_associator_->DisassociateModels(); | 1281 error = model_associator_->DisassociateModels(); |
1282 ASSERT_FALSE(error.IsSet()); | 1282 ASSERT_FALSE(error.IsSet()); |
1283 error = model_associator_->AssociateModels(NULL, NULL); | 1283 error = model_associator_->AssociateModels(NULL, NULL); |
1284 ASSERT_FALSE(error.IsSet()); | 1284 ASSERT_FALSE(error.IsSet()); |
1285 } | 1285 } |
1286 | 1286 |
1287 } // namespace browser_sync | 1287 } // namespace browser_sync |
OLD | NEW |