| OLD | NEW |
| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 struct SyncedSession { | 23 struct SyncedSession { |
| 24 typedef std::map<SessionID::id_type, SessionWindow*> SyncedWindowMap; | 24 typedef std::map<SessionID::id_type, SessionWindow*> SyncedWindowMap; |
| 25 | 25 |
| 26 // The type of device. | 26 // The type of device. |
| 27 enum DeviceType { | 27 enum DeviceType { |
| 28 TYPE_UNSET = 0, | 28 TYPE_UNSET = 0, |
| 29 TYPE_WIN = 1, | 29 TYPE_WIN = 1, |
| 30 TYPE_MACOSX = 2, | 30 TYPE_MACOSX = 2, |
| 31 TYPE_LINUX = 3, | 31 TYPE_LINUX = 3, |
| 32 TYPE_CHROMEOS = 4, | 32 TYPE_CHROMEOS = 4, |
| 33 TYPE_OTHER = 5 | 33 TYPE_OTHER = 5, |
| 34 TYPE_PHONE = 6, |
| 35 TYPE_TABLET = 7 |
| 34 }; | 36 }; |
| 35 | 37 |
| 36 SyncedSession(); | 38 SyncedSession(); |
| 37 ~SyncedSession(); | 39 ~SyncedSession(); |
| 38 | 40 |
| 39 // Unique tag for each session. | 41 // Unique tag for each session. |
| 40 std::string session_tag; | 42 std::string session_tag; |
| 41 // User-visible name | 43 // User-visible name |
| 42 std::string session_name; | 44 std::string session_name; |
| 43 | 45 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 60 // Note: chrome:// and file:// are not considered valid urls (for syncing). | 62 // Note: chrome:// and file:// are not considered valid urls (for syncing). |
| 61 bool ShouldSyncSessionTab(const SessionTab& tab); | 63 bool ShouldSyncSessionTab(const SessionTab& tab); |
| 62 | 64 |
| 63 // Checks whether the window has tabs to sync. If no tabs to sync, it returns | 65 // Checks whether the window has tabs to sync. If no tabs to sync, it returns |
| 64 // true, false otherwise. | 66 // true, false otherwise. |
| 65 bool SessionWindowHasNoTabsToSync(const SessionWindow& window); | 67 bool SessionWindowHasNoTabsToSync(const SessionWindow& window); |
| 66 | 68 |
| 67 } // namespace browser_sync | 69 } // namespace browser_sync |
| 68 | 70 |
| 69 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_SESSION_H_ | 71 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_SESSION_H_ |
| OLD | NEW |