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

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

Issue 7966020: [Sync] Fix Session's handling of windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix perf tests Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_SYNCED_SESSION_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNCED_SESSION_H_
6 #define CHROME_BROWSER_SYNC_GLUE_SYNCED_SESSION_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_SYNCED_SESSION_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map>
9 #include <string> 10 #include <string>
10 #include <vector> 11
12 #include "chrome/browser/sessions/session_id.h"
11 13
12 struct SessionWindow; 14 struct SessionWindow;
13 15
14 namespace browser_sync { 16 namespace browser_sync {
15 17
16 // Defines a synced session for use by session sync. A synced session is a 18 // Defines a synced session for use by session sync. A synced session is a
17 // list of windows along with a unique session identifer (tag) and meta-data 19 // list of windows along with a unique session identifer (tag) and meta-data
18 // about the device being synced. 20 // about the device being synced.
19 struct SyncedSession { 21 struct SyncedSession {
22 typedef std::map<SessionID::id_type, SessionWindow*> SyncedWindowMap;
23
20 // The type of device. 24 // The type of device.
21 enum DeviceType { 25 enum DeviceType {
22 TYPE_UNSET = 0, 26 TYPE_UNSET = 0,
23 TYPE_WIN = 1, 27 TYPE_WIN = 1,
24 TYPE_MACOSX = 2, 28 TYPE_MACOSX = 2,
25 TYPE_LINUX = 3, 29 TYPE_LINUX = 3,
26 TYPE_CHROMEOS = 4, 30 TYPE_CHROMEOS = 4,
27 TYPE_OTHER = 5 31 TYPE_OTHER = 5
28 }; 32 };
29 33
30 SyncedSession(); 34 SyncedSession();
31 ~SyncedSession(); 35 ~SyncedSession();
32 36
33 // Unique tag for each session. 37 // Unique tag for each session.
34 std::string session_tag; 38 std::string session_tag;
35 // User-visible name 39 // User-visible name
36 std::string session_name; 40 std::string session_name;
37 DeviceType device_type; 41 DeviceType device_type;
38 std::vector<SessionWindow*> windows; 42 SyncedWindowMap windows;
akalin 2011/09/26 18:34:44 Add a comment saying that the SessionWindow*s are
Nicolas Zea 2011/09/26 19:47:36 Done.
39 }; 43 };
akalin 2011/09/26 18:34:44 DISALLOW_COPY_AND_ASSIGN()? Seems like things wil
Nicolas Zea 2011/09/26 19:47:36 Done.
40 44
41 } // namespace browser_sync 45 } // namespace browser_sync
42 46
43 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_SESSION_H_ 47 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698