| Index: chrome/browser/sync/syncable/model_type.cc
|
| ===================================================================
|
| --- chrome/browser/sync/syncable/model_type.cc (revision 89422)
|
| +++ chrome/browser/sync/syncable/model_type.cc (working copy)
|
| @@ -14,6 +14,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/search_engine_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"
|
| @@ -51,6 +52,9 @@
|
| case NIGORI:
|
| specifics->MutableExtension(sync_pb::nigori);
|
| break;
|
| + case SEARCH_ENGINES:
|
| + specifics->MutableExtension(sync_pb::search_engine);
|
| + break;
|
| case SESSIONS:
|
| specifics->MutableExtension(sync_pb::session);
|
| break;
|
| @@ -101,6 +105,9 @@
|
| case NIGORI:
|
| return sync_pb::kNigoriFieldNumber;
|
| break;
|
| + case SEARCH_ENGINES:
|
| + return sync_pb::kSearchEngineFieldNumber;
|
| + break;
|
| case SESSIONS:
|
| return sync_pb::kSessionFieldNumber;
|
| break;
|
| @@ -178,6 +185,9 @@
|
| if (specifics.HasExtension(sync_pb::app))
|
| return APPS;
|
|
|
| + if (specifics.HasExtension(sync_pb::search_engine))
|
| + return SEARCH_ENGINES;
|
| +
|
| if (specifics.HasExtension(sync_pb::session))
|
| return SESSIONS;
|
|
|
| @@ -202,6 +212,8 @@
|
| return "Extensions";
|
| case NIGORI:
|
| return "Encryption keys";
|
| + case SEARCH_ENGINES:
|
| + return "Search Engines";
|
| case SESSIONS:
|
| return "Sessions";
|
| case APPS:
|
| @@ -257,6 +269,8 @@
|
| return EXTENSIONS;
|
| else if (model_type_string == "Encryption keys")
|
| return NIGORI;
|
| + else if (model_type_string == "Search Engines")
|
| + return SEARCH_ENGINES;
|
| else if (model_type_string == "Sessions")
|
| return SESSIONS;
|
| else if (model_type_string == "Apps")
|
| @@ -341,6 +355,8 @@
|
| return "google_chrome_extensions";
|
| case NIGORI:
|
| return "google_chrome_nigori";
|
| + case SEARCH_ENGINES:
|
| + return "google_chrome_search_engines";
|
| case SESSIONS:
|
| return "google_chrome_sessions";
|
| case APPS:
|
| @@ -398,6 +414,10 @@
|
| SYNC_FREQ_HISTOGRAM("Sync.FreqNigori", time);
|
| return;
|
| }
|
| + case SEARCH_ENGINES: {
|
| + SYNC_FREQ_HISTOGRAM("Sync.FreqSearchEngines", time);
|
| + return;
|
| + }
|
| case SESSIONS: {
|
| SYNC_FREQ_HISTOGRAM("Sync.FreqSessions", time);
|
| return;
|
| @@ -425,6 +445,7 @@
|
| const char kExtensionNotificationType[] = "EXTENSION";
|
| const char kNigoriNotificationType[] = "NIGORI";
|
| const char kAppNotificationType[] = "APP";
|
| +const char kSearchEngineNotificationType[] = "SEARCH_ENGINE";
|
| const char kSessionNotificationType[] = "SESSION";
|
| const char kAutofillProfileNotificationType[] = "AUTOFILL_PROFILE";
|
| } // namespace
|
| @@ -459,6 +480,9 @@
|
| case APPS:
|
| *notification_type = kAppNotificationType;
|
| return true;
|
| + case SEARCH_ENGINES:
|
| + *notification_type = kSearchEngineNotificationType;
|
| + return true;
|
| case SESSIONS:
|
| *notification_type = kSessionNotificationType;
|
| return true;
|
| @@ -501,6 +525,9 @@
|
| } else if (notification_type == kAppNotificationType) {
|
| *model_type = APPS;
|
| return true;
|
| + } else if (notification_type == kSearchEngineNotificationType) {
|
| + *model_type = SEARCH_ENGINES;
|
| + return true;
|
| } else if (notification_type == kSessionNotificationType) {
|
| *model_type = SESSIONS;
|
| return true;
|
|
|