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" |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 case chrome::NOTIFICATION_SYNC_REFRESH_LOCAL: | 193 case chrome::NOTIFICATION_SYNC_REFRESH_LOCAL: |
194 notified_of_refresh_ = true; | 194 notified_of_refresh_ = true; |
195 break; | 195 break; |
196 default: | 196 default: |
197 NOTREACHED(); | 197 NOTREACHED(); |
198 break; | 198 break; |
199 } | 199 } |
200 } | 200 } |
201 | 201 |
202 virtual void TearDown() { | 202 virtual void TearDown() { |
| 203 sync_service_->Shutdown(); |
203 sync_service_.reset(); | 204 sync_service_.reset(); |
204 profile()->ResetRequestContext(); | 205 profile()->ResetRequestContext(); |
205 | 206 |
206 // We need to destroy the profile before shutting down the threads, because | 207 // We need to destroy the profile before shutting down the threads, because |
207 // some of the ref counted objects in the profile depend on their | 208 // some of the ref counted objects in the profile depend on their |
208 // destruction on the io thread. | 209 // destruction on the io thread. |
209 DestroyBrowserAndProfile(); | 210 DestroyBrowserAndProfile(); |
210 set_profile(NULL); | 211 set_profile(NULL); |
211 | 212 |
212 // Pump messages posted by the sync core thread (which may end up | 213 // Pump messages posted by the sync core thread (which may end up |
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1195 sync_pb::SessionSpecifics specifics; | 1196 sync_pb::SessionSpecifics specifics; |
1196 header.SetSessionSpecifics(specifics); | 1197 header.SetSessionSpecifics(specifics); |
1197 } | 1198 } |
1198 // Ensure we associate properly despite the pre-existing node with our local | 1199 // Ensure we associate properly despite the pre-existing node with our local |
1199 // tag. | 1200 // tag. |
1200 error = model_associator_->AssociateModels(); | 1201 error = model_associator_->AssociateModels(); |
1201 ASSERT_FALSE(error.IsSet()); | 1202 ASSERT_FALSE(error.IsSet()); |
1202 } | 1203 } |
1203 | 1204 |
1204 } // namespace browser_sync | 1205 } // namespace browser_sync |
OLD | NEW |