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

Side by Side Diff: chrome/browser/sync/glue/session_model_associator.h

Issue 10911073: NOT FOR COMMIT: Add DeviceInfo type and ChangeProcessor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix several issues Created 8 years, 3 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
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 #ifndef CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_
6 #define CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 25 matching lines...) Expand all
36 class ProfileSyncService; 36 class ProfileSyncService;
37 37
38 namespace content { 38 namespace content {
39 class NavigationEntry; 39 class NavigationEntry;
40 } // namespace content 40 } // namespace content
41 41
42 namespace syncer { 42 namespace syncer {
43 class BaseTransaction; 43 class BaseTransaction;
44 class ReadNode; 44 class ReadNode;
45 class WriteTransaction; 45 class WriteTransaction;
46 struct UserShare;
46 } // namespace syncer 47 } // namespace syncer
47 48
48 namespace sync_pb { 49 namespace sync_pb {
49 class SessionHeader; 50 class SessionHeader;
50 class SessionSpecifics; 51 class SessionSpecifics;
51 class SessionTab; 52 class SessionTab;
52 class SessionWindow; 53 class SessionWindow;
53 class TabNavigation; 54 class TabNavigation;
54 } // namespace sync_pb 55 } // namespace sync_pb
55 56
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 static bool ShouldSyncWindow(const SyncedWindowDelegate* window); 380 static bool ShouldSyncWindow(const SyncedWindowDelegate* window);
380 381
381 // Build a sync tag from tab_node_id. 382 // Build a sync tag from tab_node_id.
382 static std::string TabIdToTag( 383 static std::string TabIdToTag(
383 const std::string machine_tag, 384 const std::string machine_tag,
384 size_t tab_node_id) { 385 size_t tab_node_id) {
385 return base::StringPrintf("%s %"PRIuS"", machine_tag.c_str(), tab_node_id); 386 return base::StringPrintf("%s %"PRIuS"", machine_tag.c_str(), tab_node_id);
386 } 387 }
387 388
388 // Initializes the tag corresponding to this machine. 389 // Initializes the tag corresponding to this machine.
389 void InitializeCurrentMachineTag(syncer::WriteTransaction* trans); 390 void InitializeCurrentMachineTag(syncer::UserShare* share);
390 391
391 // Initializes the user visible name for this session 392 // Initializes the user visible name for this session
392 void InitializeCurrentSessionName(); 393 void InitializeCurrentSessionName();
393 394
394 // Updates the server data based upon the current client session. If no node 395 // Updates the server data based upon the current client session. If no node
395 // corresponding to this machine exists in the sync model, one is created. 396 // corresponding to this machine exists in the sync model, one is created.
396 // Returns true on success, false if association failed. 397 // Returns true on success, false if association failed.
397 bool UpdateSyncModelDataFromClient(syncer::SyncError* error); 398 bool UpdateSyncModelDataFromClient(syncer::SyncError* error);
398 399
399 // Pulls the current sync model from the sync database and returns true upon 400 // Pulls the current sync model from the sync database and returns true upon
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 std::map<std::string, linked_ptr<SyncedFaviconInfo> > synced_favicons_; 560 std::map<std::string, linked_ptr<SyncedFaviconInfo> > synced_favicons_;
560 // Map of page URL -> favicon url. 561 // Map of page URL -> favicon url.
561 std::map<std::string, std::string> synced_favicon_pages_; 562 std::map<std::string, std::string> synced_favicon_pages_;
562 563
563 DISALLOW_COPY_AND_ASSIGN(SessionModelAssociator); 564 DISALLOW_COPY_AND_ASSIGN(SessionModelAssociator);
564 }; 565 };
565 566
566 } // namespace browser_sync 567 } // namespace browser_sync
567 568
568 #endif // CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_ 569 #endif // CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/model_association_manager.cc ('k') | chrome/browser/sync/glue/session_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698