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

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

Issue 10855037: [Sync] Add history delete directive type (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head, add TODO Created 8 years, 2 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 nigori->set_encrypt_extensions( 268 nigori->set_encrypt_extensions(
269 encrypted_types.Has(EXTENSIONS)); 269 encrypted_types.Has(EXTENSIONS));
270 nigori->set_encrypt_search_engines( 270 nigori->set_encrypt_search_engines(
271 encrypted_types.Has(SEARCH_ENGINES)); 271 encrypted_types.Has(SEARCH_ENGINES));
272 nigori->set_encrypt_sessions(encrypted_types.Has(SESSIONS)); 272 nigori->set_encrypt_sessions(encrypted_types.Has(SESSIONS));
273 nigori->set_encrypt_app_settings( 273 nigori->set_encrypt_app_settings(
274 encrypted_types.Has(APP_SETTINGS)); 274 encrypted_types.Has(APP_SETTINGS));
275 nigori->set_encrypt_apps(encrypted_types.Has(APPS)); 275 nigori->set_encrypt_apps(encrypted_types.Has(APPS));
276 nigori->set_encrypt_app_notifications( 276 nigori->set_encrypt_app_notifications(
277 encrypted_types.Has(APP_NOTIFICATIONS)); 277 encrypted_types.Has(APP_NOTIFICATIONS));
278 nigori->set_encrypt_history_delete_directives(
Nicolas Zea 2012/10/15 19:03:57 Does it make sense to have these changes? Perhaps
279 encrypted_types.Has(HISTORY_DELETE_DIRECTIVES));
278 } 280 }
279 281
280 ModelTypeSet GetEncryptedTypesFromNigori( 282 ModelTypeSet GetEncryptedTypesFromNigori(
281 const sync_pb::NigoriSpecifics& nigori) { 283 const sync_pb::NigoriSpecifics& nigori) {
282 if (nigori.encrypt_everything()) 284 if (nigori.encrypt_everything())
283 return ModelTypeSet::All(); 285 return ModelTypeSet::All();
284 286
285 ModelTypeSet encrypted_types; 287 ModelTypeSet encrypted_types;
286 COMPILE_ASSERT(17, MODEL_TYPE_COUNT); 288 COMPILE_ASSERT(17, MODEL_TYPE_COUNT);
287 if (nigori.encrypt_bookmarks()) 289 if (nigori.encrypt_bookmarks())
(...skipping 15 matching lines...) Expand all
303 if (nigori.encrypt_search_engines()) 305 if (nigori.encrypt_search_engines())
304 encrypted_types.Put(SEARCH_ENGINES); 306 encrypted_types.Put(SEARCH_ENGINES);
305 if (nigori.encrypt_sessions()) 307 if (nigori.encrypt_sessions())
306 encrypted_types.Put(SESSIONS); 308 encrypted_types.Put(SESSIONS);
307 if (nigori.encrypt_app_settings()) 309 if (nigori.encrypt_app_settings())
308 encrypted_types.Put(APP_SETTINGS); 310 encrypted_types.Put(APP_SETTINGS);
309 if (nigori.encrypt_apps()) 311 if (nigori.encrypt_apps())
310 encrypted_types.Put(APPS); 312 encrypted_types.Put(APPS);
311 if (nigori.encrypt_app_notifications()) 313 if (nigori.encrypt_app_notifications())
312 encrypted_types.Put(APP_NOTIFICATIONS); 314 encrypted_types.Put(APP_NOTIFICATIONS);
315 if (nigori.encrypt_history_delete_directives())
316 encrypted_types.Put(HISTORY_DELETE_DIRECTIVES);
313 return encrypted_types; 317 return encrypted_types;
314 } 318 }
315 319
316 } // namespace syncable 320 } // namespace syncable
317 } // namespace syncer 321 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698