| 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;
|
|
|