| 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/glue/sync_backend_host.h" | 5 #include "chrome/browser/sync/glue/sync_backend_host.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 | 8 |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 fake_manager_(NULL) {} | 140 fake_manager_(NULL) {} |
| 141 | 141 |
| 142 virtual ~SyncBackendHostTest() {} | 142 virtual ~SyncBackendHostTest() {} |
| 143 | 143 |
| 144 virtual void SetUp() OVERRIDE { | 144 virtual void SetUp() OVERRIDE { |
| 145 io_thread_.StartIOThread(); | 145 io_thread_.StartIOThread(); |
| 146 profile_.reset(new TestingProfile()); | 146 profile_.reset(new TestingProfile()); |
| 147 profile_->CreateRequestContext(); | 147 profile_->CreateRequestContext(); |
| 148 sync_prefs_.reset(new SyncPrefs(profile_->GetPrefs())); | 148 sync_prefs_.reset(new SyncPrefs(profile_->GetPrefs())); |
| 149 invalidator_storage_.reset(new InvalidatorStorage( | 149 invalidator_storage_.reset(new InvalidatorStorage( |
| 150 profile_->GetPrefs(), | 150 profile_->GetPrefs())); |
| 151 static_cast<PrefRegistrySyncable*>( | |
| 152 profile_->GetPrefs()->DeprecatedGetPrefRegistry()))); | |
| 153 backend_.reset(new SyncBackendHost( | 151 backend_.reset(new SyncBackendHost( |
| 154 profile_->GetDebugName(), | 152 profile_->GetDebugName(), |
| 155 profile_.get(), | 153 profile_.get(), |
| 156 sync_prefs_->AsWeakPtr(), | 154 sync_prefs_->AsWeakPtr(), |
| 157 invalidator_storage_->AsWeakPtr())); | 155 invalidator_storage_->AsWeakPtr())); |
| 158 credentials_.email = "user@example.com"; | 156 credentials_.email = "user@example.com"; |
| 159 credentials_.sync_token = "sync_token"; | 157 credentials_.sync_token = "sync_token"; |
| 160 | 158 |
| 161 // These types are always implicitly enabled. | 159 // These types are always implicitly enabled. |
| 162 enabled_types_.PutAll(syncer::ControlTypes()); | 160 enabled_types_.PutAll(syncer::ControlTypes()); |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 fake_manager_->WaitForSyncThread(); | 744 fake_manager_->WaitForSyncThread(); |
| 747 EXPECT_FALSE(types.Equals(fake_manager_->GetLastRefreshRequestTypes())); | 745 EXPECT_FALSE(types.Equals(fake_manager_->GetLastRefreshRequestTypes())); |
| 748 | 746 |
| 749 backend_->Shutdown(false); | 747 backend_->Shutdown(false); |
| 750 backend_.reset(); | 748 backend_.reset(); |
| 751 } | 749 } |
| 752 | 750 |
| 753 } // namespace | 751 } // namespace |
| 754 | 752 |
| 755 } // namespace browser_sync | 753 } // namespace browser_sync |
| OLD | NEW |