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

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

Issue 11445002: Sync user's custom spellcheck dictionary (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix compile on some platforms 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
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/public/pref_member.h" 8 #include "base/prefs/public/pref_member.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 case syncer::SEARCH_ENGINES: 308 case syncer::SEARCH_ENGINES:
309 return prefs::kSyncSearchEngines; 309 return prefs::kSyncSearchEngines;
310 case syncer::SESSIONS: 310 case syncer::SESSIONS:
311 return prefs::kSyncSessions; 311 return prefs::kSyncSessions;
312 case syncer::APP_NOTIFICATIONS: 312 case syncer::APP_NOTIFICATIONS:
313 return prefs::kSyncAppNotifications; 313 return prefs::kSyncAppNotifications;
314 case syncer::HISTORY_DELETE_DIRECTIVES: 314 case syncer::HISTORY_DELETE_DIRECTIVES:
315 return prefs::kSyncHistoryDeleteDirectives; 315 return prefs::kSyncHistoryDeleteDirectives;
316 case syncer::SYNCED_NOTIFICATIONS: 316 case syncer::SYNCED_NOTIFICATIONS:
317 return prefs::kSyncSyncedNotifications; 317 return prefs::kSyncSyncedNotifications;
318 case syncer::DICTIONARY:
319 return prefs::kSyncDictionary;
318 default: 320 default:
319 break; 321 break;
320 } 322 }
321 NOTREACHED(); 323 NOTREACHED();
322 return NULL; 324 return NULL;
323 } 325 }
324 326
325 #if defined(OS_CHROMEOS) 327 #if defined(OS_CHROMEOS)
326 std::string SyncPrefs::GetSpareBootstrapToken() const { 328 std::string SyncPrefs::GetSpareBootstrapToken() const {
327 DCHECK(CalledOnValidThread()); 329 DCHECK(CalledOnValidThread());
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 } 374 }
373 375
374 void SyncPrefs::RegisterPrefGroups() { 376 void SyncPrefs::RegisterPrefGroups() {
375 pref_groups_[syncer::APPS].Put(syncer::APP_NOTIFICATIONS); 377 pref_groups_[syncer::APPS].Put(syncer::APP_NOTIFICATIONS);
376 pref_groups_[syncer::APPS].Put(syncer::APP_SETTINGS); 378 pref_groups_[syncer::APPS].Put(syncer::APP_SETTINGS);
377 379
378 pref_groups_[syncer::AUTOFILL].Put(syncer::AUTOFILL_PROFILE); 380 pref_groups_[syncer::AUTOFILL].Put(syncer::AUTOFILL_PROFILE);
379 381
380 pref_groups_[syncer::EXTENSIONS].Put(syncer::EXTENSION_SETTINGS); 382 pref_groups_[syncer::EXTENSIONS].Put(syncer::EXTENSION_SETTINGS);
381 383
384 pref_groups_[syncer::PREFERENCES].Put(syncer::DICTIONARY);
382 pref_groups_[syncer::PREFERENCES].Put(syncer::SEARCH_ENGINES); 385 pref_groups_[syncer::PREFERENCES].Put(syncer::SEARCH_ENGINES);
383 386
384 // TODO(akalin): Revisit this once UI lands. 387 // TODO(akalin): Revisit this once UI lands.
385 pref_groups_[syncer::SESSIONS].Put(syncer::HISTORY_DELETE_DIRECTIVES); 388 pref_groups_[syncer::SESSIONS].Put(syncer::HISTORY_DELETE_DIRECTIVES);
386 } 389 }
387 390
388 // static 391 // static
389 void SyncPrefs::RegisterDataTypePreferredPref(PrefServiceSyncable* prefs, 392 void SyncPrefs::RegisterDataTypePreferredPref(PrefServiceSyncable* prefs,
390 syncer::ModelType type, 393 syncer::ModelType type,
391 bool is_preferred) { 394 bool is_preferred) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 if (types.Has(i->first)) 437 if (types.Has(i->first))
435 types_with_groups.PutAll(i->second); 438 types_with_groups.PutAll(i->second);
436 else 439 else
437 types_with_groups.RemoveAll(i->second); 440 types_with_groups.RemoveAll(i->second);
438 } 441 }
439 types_with_groups.RetainAll(registered_types); 442 types_with_groups.RetainAll(registered_types);
440 return types_with_groups; 443 return types_with_groups;
441 } 444 }
442 445
443 } // namespace browser_sync 446 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698