| 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 BrowserWithTestWindowTest::SetUp(); | 201 BrowserWithTestWindowTest::SetUp(); |
| 202 io_thread_.StartIOThread(); | 202 io_thread_.StartIOThread(); |
| 203 profile()->CreateRequestContext(); | 203 profile()->CreateRequestContext(); |
| 204 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 204 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| 205 registrar_.Add(this, chrome::NOTIFICATION_FOREIGN_SESSION_UPDATED, | 205 registrar_.Add(this, chrome::NOTIFICATION_FOREIGN_SESSION_UPDATED, |
| 206 content::NotificationService::AllSources()); | 206 content::NotificationService::AllSources()); |
| 207 registrar_.Add(this, chrome::NOTIFICATION_SYNC_REFRESH_LOCAL, | 207 registrar_.Add(this, chrome::NOTIFICATION_SYNC_REFRESH_LOCAL, |
| 208 content::NotificationService::AllSources()); | 208 content::NotificationService::AllSources()); |
| 209 } | 209 } |
| 210 | 210 |
| 211 void Observe(int type, | 211 virtual void Observe(int type, |
| 212 const content::NotificationSource& source, | 212 const content::NotificationSource& source, |
| 213 const content::NotificationDetails& details) { | 213 const content::NotificationDetails& details) OVERRIDE { |
| 214 switch (type) { | 214 switch (type) { |
| 215 case chrome::NOTIFICATION_FOREIGN_SESSION_UPDATED: | 215 case chrome::NOTIFICATION_FOREIGN_SESSION_UPDATED: |
| 216 notified_of_update_ = true; | 216 notified_of_update_ = true; |
| 217 break; | 217 break; |
| 218 case chrome::NOTIFICATION_SYNC_REFRESH_LOCAL: | 218 case chrome::NOTIFICATION_SYNC_REFRESH_LOCAL: |
| 219 notified_of_refresh_ = true; | 219 notified_of_refresh_ = true; |
| 220 break; | 220 break; |
| 221 default: | 221 default: |
| 222 NOTREACHED(); | 222 NOTREACHED(); |
| 223 break; | 223 break; |
| (...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1213 sync_pb::SessionSpecifics specifics; | 1213 sync_pb::SessionSpecifics specifics; |
| 1214 header.SetSessionSpecifics(specifics); | 1214 header.SetSessionSpecifics(specifics); |
| 1215 } | 1215 } |
| 1216 // Ensure we associate properly despite the pre-existing node with our local | 1216 // Ensure we associate properly despite the pre-existing node with our local |
| 1217 // tag. | 1217 // tag. |
| 1218 error = model_associator_->AssociateModels(NULL, NULL); | 1218 error = model_associator_->AssociateModels(NULL, NULL); |
| 1219 ASSERT_FALSE(error.IsSet()); | 1219 ASSERT_FALSE(error.IsSet()); |
| 1220 } | 1220 } |
| 1221 | 1221 |
| 1222 } // namespace browser_sync | 1222 } // namespace browser_sync |
| OLD | NEW |