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/location.h" | 13 #include "base/location.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
16 #include "base/stl_util.h" | 16 #include "base/stl_util.h" |
17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
18 #include "base/time.h" | 18 #include "base/time.h" |
19 #include "chrome/browser/invalidation/invalidation_service_factory.h" | |
20 #include "chrome/browser/signin/signin_manager.h" | 19 #include "chrome/browser/signin/signin_manager.h" |
21 #include "chrome/browser/signin/signin_manager_factory.h" | 20 #include "chrome/browser/signin/signin_manager_factory.h" |
22 #include "chrome/browser/signin/token_service_factory.h" | 21 #include "chrome/browser/signin/token_service_factory.h" |
23 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" | 22 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" |
24 #include "chrome/browser/sync/glue/device_info.h" | 23 #include "chrome/browser/sync/glue/device_info.h" |
25 #include "chrome/browser/sync/glue/session_change_processor.h" | 24 #include "chrome/browser/sync/glue/session_change_processor.h" |
26 #include "chrome/browser/sync/glue/session_data_type_controller.h" | 25 #include "chrome/browser/sync/glue/session_data_type_controller.h" |
27 #include "chrome/browser/sync/glue/session_model_associator.h" | 26 #include "chrome/browser/sync/glue/session_model_associator.h" |
28 #include "chrome/browser/sync/glue/sync_backend_host.h" | 27 #include "chrome/browser/sync/glue/sync_backend_host.h" |
29 #include "chrome/browser/sync/glue/synced_device_tracker.h" | 28 #include "chrome/browser/sync/glue/synced_device_tracker.h" |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 notified_of_update_(false), | 198 notified_of_update_(false), |
200 notified_of_refresh_(false) {} | 199 notified_of_refresh_(false) {} |
201 ProfileSyncService* sync_service() { return sync_service_.get(); } | 200 ProfileSyncService* sync_service() { return sync_service_.get(); } |
202 | 201 |
203 protected: | 202 protected: |
204 virtual TestingProfile* CreateProfile() OVERRIDE { | 203 virtual TestingProfile* CreateProfile() OVERRIDE { |
205 TestingProfile* profile = new TestingProfile(); | 204 TestingProfile* profile = new TestingProfile(); |
206 // Don't want the profile to create a real ProfileSyncService. | 205 // Don't want the profile to create a real ProfileSyncService. |
207 ProfileSyncServiceFactory::GetInstance()->SetTestingFactory(profile, | 206 ProfileSyncServiceFactory::GetInstance()->SetTestingFactory(profile, |
208 NULL); | 207 NULL); |
209 invalidation::InvalidationServiceFactory::GetInstance()-> | |
210 SetBuildOnlyFakeInvalidatorsForTest(profile); | |
211 return profile; | 208 return profile; |
212 } | 209 } |
213 | 210 |
214 virtual void SetUp() { | 211 virtual void SetUp() { |
215 // BrowserWithTestWindowTest implementation. | 212 // BrowserWithTestWindowTest implementation. |
216 BrowserWithTestWindowTest::SetUp(); | 213 BrowserWithTestWindowTest::SetUp(); |
217 io_thread_.StartIOThread(); | 214 io_thread_.StartIOThread(); |
218 profile()->CreateRequestContext(); | 215 profile()->CreateRequestContext(); |
219 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 216 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
220 registrar_.Add(this, chrome::NOTIFICATION_FOREIGN_SESSION_UPDATED, | 217 registrar_.Add(this, chrome::NOTIFICATION_FOREIGN_SESSION_UPDATED, |
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1251 sync_pb::SessionSpecifics specifics; | 1248 sync_pb::SessionSpecifics specifics; |
1252 header.SetSessionSpecifics(specifics); | 1249 header.SetSessionSpecifics(specifics); |
1253 } | 1250 } |
1254 // Ensure we associate properly despite the pre-existing node with our local | 1251 // Ensure we associate properly despite the pre-existing node with our local |
1255 // tag. | 1252 // tag. |
1256 error = model_associator_->AssociateModels(NULL, NULL); | 1253 error = model_associator_->AssociateModels(NULL, NULL); |
1257 ASSERT_FALSE(error.IsSet()); | 1254 ASSERT_FALSE(error.IsSet()); |
1258 } | 1255 } |
1259 | 1256 |
1260 } // namespace browser_sync | 1257 } // namespace browser_sync |
OLD | NEW |