| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 using syncer::TestIdFactory; | 62 using syncer::TestIdFactory; |
| 63 | 63 |
| 64 namespace browser_sync { | 64 namespace browser_sync { |
| 65 | 65 |
| 66 namespace { | 66 namespace { |
| 67 | 67 |
| 68 void BuildSessionSpecifics(const std::string& tag, | 68 void BuildSessionSpecifics(const std::string& tag, |
| 69 sync_pb::SessionSpecifics* meta) { | 69 sync_pb::SessionSpecifics* meta) { |
| 70 meta->set_session_tag(tag); | 70 meta->set_session_tag(tag); |
| 71 sync_pb::SessionHeader* header = meta->mutable_header(); | 71 sync_pb::SessionHeader* header = meta->mutable_header(); |
| 72 header->set_device_type(sync_pb::SessionHeader_DeviceType_TYPE_LINUX); | 72 header->set_device_type(sync_pb::SyncEnums_DeviceType_TYPE_LINUX); |
| 73 header->set_client_name("name"); | 73 header->set_client_name("name"); |
| 74 } | 74 } |
| 75 | 75 |
| 76 void AddWindowSpecifics(int window_id, | 76 void AddWindowSpecifics(int window_id, |
| 77 const std::vector<int>& tab_list, | 77 const std::vector<int>& tab_list, |
| 78 sync_pb::SessionSpecifics* meta) { | 78 sync_pb::SessionSpecifics* meta) { |
| 79 sync_pb::SessionHeader* header = meta->mutable_header(); | 79 sync_pb::SessionHeader* header = meta->mutable_header(); |
| 80 sync_pb::SessionWindow* window = header->add_window(); | 80 sync_pb::SessionWindow* window = header->add_window(); |
| 81 window->set_window_id(window_id); | 81 window->set_window_id(window_id); |
| 82 window->set_selected_tab_index(0); | 82 window->set_selected_tab_index(0); |
| (...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1195 sync_pb::SessionSpecifics specifics; | 1195 sync_pb::SessionSpecifics specifics; |
| 1196 header.SetSessionSpecifics(specifics); | 1196 header.SetSessionSpecifics(specifics); |
| 1197 } | 1197 } |
| 1198 // Ensure we associate properly despite the pre-existing node with our local | 1198 // Ensure we associate properly despite the pre-existing node with our local |
| 1199 // tag. | 1199 // tag. |
| 1200 error = model_associator_->AssociateModels(); | 1200 error = model_associator_->AssociateModels(); |
| 1201 ASSERT_FALSE(error.IsSet()); | 1201 ASSERT_FALSE(error.IsSet()); |
| 1202 } | 1202 } |
| 1203 | 1203 |
| 1204 } // namespace browser_sync | 1204 } // namespace browser_sync |
| OLD | NEW |