Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: chrome/browser/sync/profile_sync_service_session_unittest.cc

Issue 10985008: sync: Add DeviceInfo protobuf and supporting code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another missing include Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/sync_prefs_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 sync_pb::SessionSpecifics specifics; 1196 sync_pb::SessionSpecifics specifics;
1197 header.SetSessionSpecifics(specifics); 1197 header.SetSessionSpecifics(specifics);
1198 } 1198 }
1199 // 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
1200 // tag. 1200 // tag.
1201 error = model_associator_->AssociateModels(); 1201 error = model_associator_->AssociateModels();
1202 ASSERT_FALSE(error.IsSet()); 1202 ASSERT_FALSE(error.IsSet());
1203 } 1203 }
1204 1204
1205 } // namespace browser_sync 1205 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/sync_prefs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698