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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 return "linux"; | 67 return "linux"; |
68 case SyncedSession::TYPE_CHROMEOS: | 68 case SyncedSession::TYPE_CHROMEOS: |
69 return "chromeos"; | 69 return "chromeos"; |
70 case SyncedSession::TYPE_OTHER: | 70 case SyncedSession::TYPE_OTHER: |
71 return "other"; | 71 return "other"; |
72 case SyncedSession::TYPE_PHONE: | 72 case SyncedSession::TYPE_PHONE: |
73 return "phone"; | 73 return "phone"; |
74 case SyncedSession::TYPE_TABLET: | 74 case SyncedSession::TYPE_TABLET: |
75 return "tablet"; | 75 return "tablet"; |
76 default: | 76 default: |
77 return ""; | 77 return std::string(); |
78 } | 78 } |
79 } | 79 } |
80 | 80 |
81 private: | 81 private: |
82 DISALLOW_COPY_AND_ASSIGN(SyncedSession); | 82 DISALLOW_COPY_AND_ASSIGN(SyncedSession); |
83 }; | 83 }; |
84 | 84 |
85 // Control which foreign tabs we're interested in syncing/displaying. Checks | 85 // Control which foreign tabs we're interested in syncing/displaying. Checks |
86 // that the tab has navigations and contains at least one valid url. | 86 // that the tab has navigations and contains at least one valid url. |
87 // Note: chrome:// and file:// are not considered valid urls (for syncing). | 87 // Note: chrome:// and file:// are not considered valid urls (for syncing). |
88 bool ShouldSyncSessionTab(const SessionTab& tab); | 88 bool ShouldSyncSessionTab(const SessionTab& tab); |
89 | 89 |
90 // Checks whether the window has tabs to sync. If no tabs to sync, it returns | 90 // Checks whether the window has tabs to sync. If no tabs to sync, it returns |
91 // true, false otherwise. | 91 // true, false otherwise. |
92 bool SessionWindowHasNoTabsToSync(const SessionWindow& window); | 92 bool SessionWindowHasNoTabsToSync(const SessionWindow& window); |
93 | 93 |
94 } // namespace browser_sync | 94 } // namespace browser_sync |
95 | 95 |
96 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_SESSION_H_ | 96 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_SESSION_H_ |
OLD | NEW |