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

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

Issue 10827266: [Sync] Add SyncEncryptionHandler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 8 years, 4 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/syncable/nigori_util.h" 5 #include "sync/syncable/nigori_util.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 } 239 }
240 } 240 }
241 entry->Put(syncable::SPECIFICS, generated_specifics); 241 entry->Put(syncable::SPECIFICS, generated_specifics);
242 DVLOG(1) << "Overwriting specifics of type " 242 DVLOG(1) << "Overwriting specifics of type "
243 << ModelTypeToString(type) 243 << ModelTypeToString(type)
244 << " and marking for syncing."; 244 << " and marking for syncing.";
245 syncable::MarkForSyncing(entry); 245 syncable::MarkForSyncing(entry);
246 return true; 246 return true;
247 } 247 }
248 248
249 void UpdateNigoriFromEncryptedTypes(ModelTypeSet encrypted_types,
250 bool encrypt_everything,
251 sync_pb::NigoriSpecifics* nigori) {
252 nigori->set_encrypt_everything(encrypt_everything);
253 nigori->set_encrypt_bookmarks(
254 encrypted_types.Has(BOOKMARKS));
255 nigori->set_encrypt_preferences(
256 encrypted_types.Has(PREFERENCES));
257 nigori->set_encrypt_autofill_profile(
258 encrypted_types.Has(AUTOFILL_PROFILE));
259 nigori->set_encrypt_autofill(encrypted_types.Has(AUTOFILL));
260 nigori->set_encrypt_themes(encrypted_types.Has(THEMES));
261 nigori->set_encrypt_typed_urls(
262 encrypted_types.Has(TYPED_URLS));
263 nigori->set_encrypt_extension_settings(
264 encrypted_types.Has(EXTENSION_SETTINGS));
265 nigori->set_encrypt_extensions(
266 encrypted_types.Has(EXTENSIONS));
267 nigori->set_encrypt_search_engines(
268 encrypted_types.Has(SEARCH_ENGINES));
269 nigori->set_encrypt_sessions(encrypted_types.Has(SESSIONS));
270 nigori->set_encrypt_app_settings(
271 encrypted_types.Has(APP_SETTINGS));
272 nigori->set_encrypt_apps(encrypted_types.Has(APPS));
273 nigori->set_encrypt_app_notifications(
274 encrypted_types.Has(APP_NOTIFICATIONS));
275 }
276
249 } // namespace syncable 277 } // namespace syncable
250 } // namespace syncer 278 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698