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

Side by Side Diff: chrome/browser/sync/sync_prefs.cc

Issue 12033093: sync: Implementation of Priority Preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 "chrome/browser/sync/sync_prefs.h" 5 #include "chrome/browser/sync/sync_prefs.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/prefs/public/pref_member.h" 9 #include "base/prefs/public/pref_member.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 case syncer::HISTORY_DELETE_DIRECTIVES: 321 case syncer::HISTORY_DELETE_DIRECTIVES:
322 return prefs::kSyncHistoryDeleteDirectives; 322 return prefs::kSyncHistoryDeleteDirectives;
323 case syncer::SYNCED_NOTIFICATIONS: 323 case syncer::SYNCED_NOTIFICATIONS:
324 return prefs::kSyncSyncedNotifications; 324 return prefs::kSyncSyncedNotifications;
325 case syncer::DICTIONARY: 325 case syncer::DICTIONARY:
326 return prefs::kSyncDictionary; 326 return prefs::kSyncDictionary;
327 case syncer::FAVICON_IMAGES: 327 case syncer::FAVICON_IMAGES:
328 return prefs::kSyncFaviconImages; 328 return prefs::kSyncFaviconImages;
329 case syncer::FAVICON_TRACKING: 329 case syncer::FAVICON_TRACKING:
330 return prefs::kSyncFaviconTracking; 330 return prefs::kSyncFaviconTracking;
331 case syncer::PRIORITY_PREFERENCES:
332 return prefs::kSyncPriorityPreferences;
331 default: 333 default:
332 break; 334 break;
333 } 335 }
334 NOTREACHED(); 336 NOTREACHED();
335 return NULL; 337 return NULL;
336 } 338 }
337 339
338 #if defined(OS_CHROMEOS) 340 #if defined(OS_CHROMEOS)
339 std::string SyncPrefs::GetSpareBootstrapToken() const { 341 std::string SyncPrefs::GetSpareBootstrapToken() const {
340 DCHECK(CalledOnValidThread()); 342 DCHECK(CalledOnValidThread());
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 388
387 void SyncPrefs::RegisterPrefGroups() { 389 void SyncPrefs::RegisterPrefGroups() {
388 pref_groups_[syncer::APPS].Put(syncer::APP_NOTIFICATIONS); 390 pref_groups_[syncer::APPS].Put(syncer::APP_NOTIFICATIONS);
389 pref_groups_[syncer::APPS].Put(syncer::APP_SETTINGS); 391 pref_groups_[syncer::APPS].Put(syncer::APP_SETTINGS);
390 392
391 pref_groups_[syncer::AUTOFILL].Put(syncer::AUTOFILL_PROFILE); 393 pref_groups_[syncer::AUTOFILL].Put(syncer::AUTOFILL_PROFILE);
392 394
393 pref_groups_[syncer::EXTENSIONS].Put(syncer::EXTENSION_SETTINGS); 395 pref_groups_[syncer::EXTENSIONS].Put(syncer::EXTENSION_SETTINGS);
394 396
395 pref_groups_[syncer::PREFERENCES].Put(syncer::DICTIONARY); 397 pref_groups_[syncer::PREFERENCES].Put(syncer::DICTIONARY);
398 pref_groups_[syncer::PREFERENCES].Put(syncer::PRIORITY_PREFERENCES);
396 pref_groups_[syncer::PREFERENCES].Put(syncer::SEARCH_ENGINES); 399 pref_groups_[syncer::PREFERENCES].Put(syncer::SEARCH_ENGINES);
397 400
398 // TODO(zea): put favicons in the bookmarks group as well once it handles 401 // TODO(zea): put favicons in the bookmarks group as well once it handles
399 // those favicons. 402 // those favicons.
400 pref_groups_[syncer::SESSIONS].Put(syncer::FAVICON_IMAGES); 403 pref_groups_[syncer::SESSIONS].Put(syncer::FAVICON_IMAGES);
401 pref_groups_[syncer::SESSIONS].Put(syncer::FAVICON_TRACKING); 404 pref_groups_[syncer::SESSIONS].Put(syncer::FAVICON_TRACKING);
402 405
403 // TODO(akalin): Revisit this once UI lands. 406 // TODO(akalin): Revisit this once UI lands.
404 pref_groups_[syncer::SESSIONS].Put(syncer::HISTORY_DELETE_DIRECTIVES); 407 pref_groups_[syncer::SESSIONS].Put(syncer::HISTORY_DELETE_DIRECTIVES);
405 } 408 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 if (types.Has(i->first)) 456 if (types.Has(i->first))
454 types_with_groups.PutAll(i->second); 457 types_with_groups.PutAll(i->second);
455 else 458 else
456 types_with_groups.RemoveAll(i->second); 459 types_with_groups.RemoveAll(i->second);
457 } 460 }
458 types_with_groups.RetainAll(registered_types); 461 types_with_groups.RetainAll(registered_types);
459 return types_with_groups; 462 return types_with_groups;
460 } 463 }
461 464
462 } // namespace browser_sync 465 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698