Index: chrome/browser/sync/glue/synced_session.h |
diff --git a/chrome/browser/sync/glue/synced_session.h b/chrome/browser/sync/glue/synced_session.h |
index 60927c454305b6c3e6bd44e7e6aa99e492a8005d..482dd230e682a5cf190ea1fe99c689edea299d36 100644 |
--- a/chrome/browser/sync/glue/synced_session.h |
+++ b/chrome/browser/sync/glue/synced_session.h |
@@ -93,6 +93,29 @@ struct SyncedSession { |
// itself and free'd on destruction. |
SyncedWindowMap windows; |
+ // Converts the DeviceType enum value to a human readable string. This is used |
+ // in the NTP handler for foreign sessions. |
+ std::string DeviceTypeAsString() const { |
+ switch (device_type) { |
+ case SyncedSession::TYPE_WIN: |
+ return "win"; |
Nicolas Zea
2012/07/24 18:44:24
Not sure in what context these will be displayed,
nyquist
2012/07/24 20:18:38
They are used for matching an icon style on the NT
|
+ case SyncedSession::TYPE_MACOSX: |
+ return "macosx"; |
+ case SyncedSession::TYPE_LINUX: |
+ return "linux"; |
+ case SyncedSession::TYPE_CHROMEOS: |
+ return "chromeos"; |
+ case SyncedSession::TYPE_OTHER: |
+ return "other"; |
+ case SyncedSession::TYPE_PHONE: |
+ return "phone"; |
+ case SyncedSession::TYPE_TABLET: |
+ return "tablet"; |
+ default: |
+ return ""; |
+ } |
+ } |
+ |
private: |
DISALLOW_COPY_AND_ASSIGN(SyncedSession); |
}; |