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

Side by Side Diff: sync/syncable/model_type.cc

Issue 11958029: [Sync] Add support for proxy types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix more tests Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sync/internal_api/public/base/model_type.h" 5 #include "sync/internal_api/public/base/model_type.h"
6 6
7 #include "base/string_split.h" 7 #include "base/string_split.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "sync/protocol/app_notification_specifics.pb.h" 9 #include "sync/protocol/app_notification_specifics.pb.h"
10 #include "sync/protocol/app_setting_specifics.pb.h" 10 #include "sync/protocol/app_setting_specifics.pb.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 for (int i = FIRST_CONTROL_MODEL_TYPE; i <= LAST_CONTROL_MODEL_TYPE; ++i) { 298 for (int i = FIRST_CONTROL_MODEL_TYPE; i <= LAST_CONTROL_MODEL_TYPE; ++i) {
299 set.Put(ModelTypeFromInt(i)); 299 set.Put(ModelTypeFromInt(i));
300 } 300 }
301 301
302 // TODO(albertb): Re-enable this when the server supports it. 302 // TODO(albertb): Re-enable this when the server supports it.
303 set.Remove(PRIORITY_PREFERENCES); 303 set.Remove(PRIORITY_PREFERENCES);
304 304
305 return set; 305 return set;
306 } 306 }
307 307
308 ModelTypeSet LocalTypes() {
309 ModelTypeSet set;
310 // TODO(zea): add a TABS type here.
311 return set;
312 }
313
308 bool IsControlType(ModelType model_type) { 314 bool IsControlType(ModelType model_type) {
309 return ControlTypes().Has(model_type); 315 return ControlTypes().Has(model_type);
310 } 316 }
311 317
312 const char* ModelTypeToString(ModelType model_type) { 318 const char* ModelTypeToString(ModelType model_type) {
313 // This is used in serialization routines as well as for displaying debug 319 // This is used in serialization routines as well as for displaying debug
314 // information. Do not attempt to change these string values unless you know 320 // information. Do not attempt to change these string values unless you know
315 // what you're doing. 321 // what you're doing.
316 switch (model_type) { 322 switch (model_type) {
317 case TOP_LEVEL_FOLDER: 323 case TOP_LEVEL_FOLDER:
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 } 677 }
672 *model_type = UNSPECIFIED; 678 *model_type = UNSPECIFIED;
673 return false; 679 return false;
674 } 680 }
675 681
676 bool IsRealDataType(ModelType model_type) { 682 bool IsRealDataType(ModelType model_type) {
677 return model_type >= FIRST_REAL_MODEL_TYPE && model_type < MODEL_TYPE_COUNT; 683 return model_type >= FIRST_REAL_MODEL_TYPE && model_type < MODEL_TYPE_COUNT;
678 } 684 }
679 685
680 } // namespace syncer 686 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698