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

Unified Diff: chrome/browser/sync/syncable/model_type.cc

Issue 3168009: Added classes to enable session sync functionality.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 | « chrome/browser/sync/syncable/model_type.h ('k') | chrome/browser/views/bookmark_bar_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/syncable/model_type.cc
===================================================================
--- chrome/browser/sync/syncable/model_type.cc (revision 56023)
+++ chrome/browser/sync/syncable/model_type.cc (working copy)
@@ -12,6 +12,7 @@
#include "chrome/browser/sync/protocol/nigori_specifics.pb.h"
#include "chrome/browser/sync/protocol/password_specifics.pb.h"
#include "chrome/browser/sync/protocol/preference_specifics.pb.h"
+#include "chrome/browser/sync/protocol/session_specifics.pb.h"
#include "chrome/browser/sync/protocol/sync.pb.h"
#include "chrome/browser/sync/protocol/theme_specifics.pb.h"
#include "chrome/browser/sync/protocol/typed_url_specifics.pb.h"
@@ -45,6 +46,9 @@
case NIGORI:
specifics->MutableExtension(sync_pb::nigori);
break;
+ case SESSIONS:
+ specifics->MutableExtension(sync_pb::session);
+ break;
case APPS:
specifics->MutableExtension(sync_pb::app);
break;
@@ -112,6 +116,9 @@
if (specifics.HasExtension(sync_pb::app))
return APPS;
+ if (specifics.HasExtension(sync_pb::session))
+ return SESSIONS;
+
return UNSPECIFIED;
}
@@ -133,6 +140,8 @@
return "Extensions";
case NIGORI:
return "Encryption keys";
+ case SESSIONS:
+ return "Sessions";
case APPS:
return "Apps";
default:
@@ -153,6 +162,7 @@
const char kExtensionNotificationType[] = "EXTENSION";
const char kNigoriNotificationType[] = "NIGORI";
const char kAppNotificationType[] = "APP";
+const char kSessionNotificationType[] = "SESSION";
} // namespace
bool RealModelTypeToNotificationType(ModelType model_type,
@@ -185,6 +195,9 @@
case APPS:
*notification_type = kAppNotificationType;
return true;
+ case SESSIONS:
+ *notification_type = kSessionNotificationType;
+ return true;
default:
break;
}
@@ -221,6 +234,9 @@
} else if (notification_type == kAppNotificationType) {
*model_type = APPS;
return true;
+ } else if (notification_type == kSessionNotificationType) {
+ *model_type = SESSIONS;
+ return true;
}
*model_type = UNSPECIFIED;
return false;
« no previous file with comments | « chrome/browser/sync/syncable/model_type.h ('k') | chrome/browser/views/bookmark_bar_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698