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

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

Issue 23514039: ForeignSessionHelper Changes Needed for NTP Other Devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Yaron Created 7 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
« no previous file with comments | « chrome/browser/android/foreign_session_helper.cc ('k') | no next file » | 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 #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 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "chrome/browser/sessions/session_id.h" 12 #include "chrome/browser/sessions/session_id.h"
13 #include "chrome/browser/sessions/session_types.h" 13 #include "chrome/browser/sessions/session_types.h"
14 14
15 namespace content { 15 namespace content {
16 class NavigationEntry; 16 class NavigationEntry;
17 } 17 }
18 18
19 namespace browser_sync { 19 namespace browser_sync {
20 20
21 // Defines a synced session for use by session sync. A synced session is a 21 // Defines a synced session for use by session sync. A synced session is a
22 // list of windows along with a unique session identifer (tag) and meta-data 22 // list of windows along with a unique session identifer (tag) and meta-data
23 // about the device being synced. 23 // about the device being synced.
24 struct SyncedSession { 24 struct SyncedSession {
25 typedef std::map<SessionID::id_type, SessionWindow*> SyncedWindowMap; 25 typedef std::map<SessionID::id_type, SessionWindow*> SyncedWindowMap;
26 26
27 // The type of device. 27 // The type of device.
28 // Please keep in sync with ForeignSessionHelper.java
28 enum DeviceType { 29 enum DeviceType {
29 TYPE_UNSET = 0, 30 TYPE_UNSET = 0,
30 TYPE_WIN = 1, 31 TYPE_WIN = 1,
31 TYPE_MACOSX = 2, 32 TYPE_MACOSX = 2,
32 TYPE_LINUX = 3, 33 TYPE_LINUX = 3,
33 TYPE_CHROMEOS = 4, 34 TYPE_CHROMEOS = 4,
34 TYPE_OTHER = 5, 35 TYPE_OTHER = 5,
35 TYPE_PHONE = 6, 36 TYPE_PHONE = 6,
36 TYPE_TABLET = 7 37 TYPE_TABLET = 7
37 }; 38 };
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // Note: chrome:// and file:// are not considered valid urls (for syncing). 88 // Note: chrome:// and file:// are not considered valid urls (for syncing).
88 bool ShouldSyncSessionTab(const SessionTab& tab); 89 bool ShouldSyncSessionTab(const SessionTab& tab);
89 90
90 // Checks whether the window has tabs to sync. If no tabs to sync, it returns 91 // Checks whether the window has tabs to sync. If no tabs to sync, it returns
91 // true, false otherwise. 92 // true, false otherwise.
92 bool SessionWindowHasNoTabsToSync(const SessionWindow& window); 93 bool SessionWindowHasNoTabsToSync(const SessionWindow& window);
93 94
94 } // namespace browser_sync 95 } // namespace browser_sync
95 96
96 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_SESSION_H_ 97 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_SESSION_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/foreign_session_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698