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

Side by Side Diff: components/sync_sessions/synced_session.h

Issue 1877083002: [Sync] Moved tab_node_id tracking to session object and improved foreign session garbage collection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 COMPONENTS_SYNC_SESSIONS_SYNCED_SESSION_H_ 5 #ifndef COMPONENTS_SYNC_SESSIONS_SYNCED_SESSION_H_
6 #define COMPONENTS_SYNC_SESSIONS_SYNCED_SESSION_H_ 6 #define COMPONENTS_SYNC_SESSIONS_SYNCED_SESSION_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 ~SyncedSession(); 44 ~SyncedSession();
45 45
46 // Unique tag for each session. 46 // Unique tag for each session.
47 std::string session_tag; 47 std::string session_tag;
48 // User-visible name 48 // User-visible name
49 std::string session_name; 49 std::string session_name;
50 50
51 // Type of device this session is from. 51 // Type of device this session is from.
52 DeviceType device_type; 52 DeviceType device_type;
53 53
54 // Last time this session was modified remotely. 54 // Last time this session was modified remotely. This is the max of the header
55 // and all children tab mtimes.
55 base::Time modified_time; 56 base::Time modified_time;
56 57
57 // Map of windows that make up this session. Windowws are owned by the session 58 // Map of windows that make up this session. Windowws are owned by the session
58 // itself and free'd on destruction. 59 // itself and free'd on destruction.
59 SyncedWindowMap windows; 60 SyncedWindowMap windows;
60 61
61 // Converts the DeviceType enum value to a string. This is used 62 // Converts the DeviceType enum value to a string. This is used
62 // in the NTP handler for foreign sessions for matching session 63 // in the NTP handler for foreign sessions for matching session
63 // types to an icon style. 64 // types to an icon style.
64 std::string DeviceTypeAsString() const { 65 std::string DeviceTypeAsString() const {
(...skipping 21 matching lines...) Expand all
86 // does not create SessionTab protobufs. 87 // does not create SessionTab protobufs.
87 sync_pb::SessionHeader ToSessionHeader() const; 88 sync_pb::SessionHeader ToSessionHeader() const;
88 89
89 private: 90 private:
90 DISALLOW_COPY_AND_ASSIGN(SyncedSession); 91 DISALLOW_COPY_AND_ASSIGN(SyncedSession);
91 }; 92 };
92 93
93 } // namespace sync_driver 94 } // namespace sync_driver
94 95
95 #endif // COMPONENTS_SYNC_SESSIONS_SYNCED_SESSION_H_ 96 #endif // COMPONENTS_SYNC_SESSIONS_SYNCED_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698