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

Unified Diff: chrome/browser/sync/glue/synced_session.h

Issue 10695192: Add DeviceTypeAsString to SyncedSession. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/webui/ntp/foreign_session_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « no previous file | chrome/browser/ui/webui/ntp/foreign_session_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698