| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 ProfileSyncService::StartBehavior behavior, | 78 ProfileSyncService::StartBehavior behavior, |
| 79 bool synchronous_backend_initialization) | 79 bool synchronous_backend_initialization) |
| 80 : TestProfileSyncService(factory, | 80 : TestProfileSyncService(factory, |
| 81 profile, | 81 profile, |
| 82 signin, | 82 signin, |
| 83 behavior, | 83 behavior, |
| 84 synchronous_backend_initialization) {} | 84 synchronous_backend_initialization) {} |
| 85 virtual ~FakeProfileSyncService() {} | 85 virtual ~FakeProfileSyncService() {} |
| 86 | 86 |
| 87 virtual scoped_ptr<DeviceInfo> GetLocalDeviceInfo() const OVERRIDE { | 87 virtual scoped_ptr<DeviceInfo> GetLocalDeviceInfo() const OVERRIDE { |
| 88 return scoped_ptr<DeviceInfo>( | 88 return scoped_ptr<DeviceInfo>(new DeviceInfo("client_name", |
| 89 new DeviceInfo("client_name", "", "", sync_pb::SyncEnums::TYPE_WIN)); | 89 std::string(), |
| 90 std::string(), |
| 91 sync_pb::SyncEnums::TYPE_WIN)); |
| 90 } | 92 } |
| 91 }; | 93 }; |
| 92 | 94 |
| 93 void BuildSessionSpecifics(const std::string& tag, | 95 void BuildSessionSpecifics(const std::string& tag, |
| 94 sync_pb::SessionSpecifics* meta) { | 96 sync_pb::SessionSpecifics* meta) { |
| 95 meta->set_session_tag(tag); | 97 meta->set_session_tag(tag); |
| 96 sync_pb::SessionHeader* header = meta->mutable_header(); | 98 sync_pb::SessionHeader* header = meta->mutable_header(); |
| 97 header->set_device_type(sync_pb::SyncEnums_DeviceType_TYPE_LINUX); | 99 header->set_device_type(sync_pb::SyncEnums_DeviceType_TYPE_LINUX); |
| 98 header->set_client_name("name"); | 100 header->set_client_name("name"); |
| 99 } | 101 } |
| (...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1244 sync_pb::SessionSpecifics specifics; | 1246 sync_pb::SessionSpecifics specifics; |
| 1245 header.SetSessionSpecifics(specifics); | 1247 header.SetSessionSpecifics(specifics); |
| 1246 } | 1248 } |
| 1247 // Ensure we associate properly despite the pre-existing node with our local | 1249 // Ensure we associate properly despite the pre-existing node with our local |
| 1248 // tag. | 1250 // tag. |
| 1249 error = model_associator_->AssociateModels(NULL, NULL); | 1251 error = model_associator_->AssociateModels(NULL, NULL); |
| 1250 ASSERT_FALSE(error.IsSet()); | 1252 ASSERT_FALSE(error.IsSet()); |
| 1251 } | 1253 } |
| 1252 | 1254 |
| 1253 } // namespace browser_sync | 1255 } // namespace browser_sync |
| OLD | NEW |