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

Side by Side Diff: components/sync_driver/sync_prefs.cc

Issue 1110833002: [autofill] Sync server card and address metadata. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Work Created 5 years, 7 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 "components/sync_driver/sync_prefs.h" 5 #include "components/sync_driver/sync_prefs.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/prefs/pref_member.h" 8 #include "base/prefs/pref_member.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 switch (data_type) { 245 switch (data_type) {
246 case syncer::BOOKMARKS: 246 case syncer::BOOKMARKS:
247 return prefs::kSyncBookmarks; 247 return prefs::kSyncBookmarks;
248 case syncer::PASSWORDS: 248 case syncer::PASSWORDS:
249 return prefs::kSyncPasswords; 249 return prefs::kSyncPasswords;
250 case syncer::PREFERENCES: 250 case syncer::PREFERENCES:
251 return prefs::kSyncPreferences; 251 return prefs::kSyncPreferences;
252 case syncer::AUTOFILL: 252 case syncer::AUTOFILL:
253 return prefs::kSyncAutofill; 253 return prefs::kSyncAutofill;
254 case syncer::AUTOFILL_PROFILE: 254 case syncer::AUTOFILL_PROFILE:
255 return prefs::kSyncAutofillProfile;
256 case syncer::AUTOFILL_WALLET_DATA:
255 return prefs::kSyncAutofillWallet; 257 return prefs::kSyncAutofillWallet;
256 case syncer::AUTOFILL_WALLET_DATA: 258 case syncer::AUTOFILL_WALLET_METADATA:
257 return prefs::kSyncAutofillProfile; 259 return prefs::kSyncAutofillWalletMetadata;
258 case syncer::THEMES: 260 case syncer::THEMES:
259 return prefs::kSyncThemes; 261 return prefs::kSyncThemes;
260 case syncer::TYPED_URLS: 262 case syncer::TYPED_URLS:
261 return prefs::kSyncTypedUrls; 263 return prefs::kSyncTypedUrls;
262 case syncer::EXTENSION_SETTINGS: 264 case syncer::EXTENSION_SETTINGS:
263 return prefs::kSyncExtensionSettings; 265 return prefs::kSyncExtensionSettings;
264 case syncer::EXTENSIONS: 266 case syncer::EXTENSIONS:
265 return prefs::kSyncExtensions; 267 return prefs::kSyncExtensions;
266 case syncer::APP_LIST: 268 case syncer::APP_LIST:
267 return prefs::kSyncAppList; 269 return prefs::kSyncAppList;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 pref_service_->SetBoolean(prefs::kSyncManaged, is_managed); 346 pref_service_->SetBoolean(prefs::kSyncManaged, is_managed);
345 } 347 }
346 348
347 void SyncPrefs::RegisterPrefGroups() { 349 void SyncPrefs::RegisterPrefGroups() {
348 pref_groups_[syncer::APPS].Put(syncer::APP_NOTIFICATIONS); 350 pref_groups_[syncer::APPS].Put(syncer::APP_NOTIFICATIONS);
349 pref_groups_[syncer::APPS].Put(syncer::APP_SETTINGS); 351 pref_groups_[syncer::APPS].Put(syncer::APP_SETTINGS);
350 pref_groups_[syncer::APPS].Put(syncer::APP_LIST); 352 pref_groups_[syncer::APPS].Put(syncer::APP_LIST);
351 353
352 pref_groups_[syncer::AUTOFILL].Put(syncer::AUTOFILL_PROFILE); 354 pref_groups_[syncer::AUTOFILL].Put(syncer::AUTOFILL_PROFILE);
353 pref_groups_[syncer::AUTOFILL].Put(syncer::AUTOFILL_WALLET_DATA); 355 pref_groups_[syncer::AUTOFILL].Put(syncer::AUTOFILL_WALLET_DATA);
356 pref_groups_[syncer::AUTOFILL].Put(syncer::AUTOFILL_WALLET_METADATA);
354 357
355 pref_groups_[syncer::EXTENSIONS].Put(syncer::EXTENSION_SETTINGS); 358 pref_groups_[syncer::EXTENSIONS].Put(syncer::EXTENSION_SETTINGS);
356 359
357 pref_groups_[syncer::PREFERENCES].Put(syncer::DICTIONARY); 360 pref_groups_[syncer::PREFERENCES].Put(syncer::DICTIONARY);
358 pref_groups_[syncer::PREFERENCES].Put(syncer::PRIORITY_PREFERENCES); 361 pref_groups_[syncer::PREFERENCES].Put(syncer::PRIORITY_PREFERENCES);
359 pref_groups_[syncer::PREFERENCES].Put(syncer::SEARCH_ENGINES); 362 pref_groups_[syncer::PREFERENCES].Put(syncer::SEARCH_ENGINES);
360 363
361 pref_groups_[syncer::TYPED_URLS].Put(syncer::HISTORY_DELETE_DIRECTIVES); 364 pref_groups_[syncer::TYPED_URLS].Put(syncer::HISTORY_DELETE_DIRECTIVES);
362 pref_groups_[syncer::TYPED_URLS].Put(syncer::SESSIONS); 365 pref_groups_[syncer::TYPED_URLS].Put(syncer::SESSIONS);
363 pref_groups_[syncer::TYPED_URLS].Put(syncer::FAVICON_IMAGES); 366 pref_groups_[syncer::TYPED_URLS].Put(syncer::FAVICON_IMAGES);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 return pref_service_->GetBoolean(prefs::kSyncShutdownCleanly); 474 return pref_service_->GetBoolean(prefs::kSyncShutdownCleanly);
472 } 475 }
473 476
474 void SyncPrefs::SetCleanShutdown(bool value) { 477 void SyncPrefs::SetCleanShutdown(bool value) {
475 pref_service_->SetBoolean(prefs::kSyncShutdownCleanly, value); 478 pref_service_->SetBoolean(prefs::kSyncShutdownCleanly, value);
476 } 479 }
477 480
478 } // namespace sync_driver 481 } // namespace sync_driver
479 482
480 483
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698