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

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

Issue 11637053: sync: Start moving away from PREV_ID and NEXT_ID (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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 | Annotate | Revision Log
« no previous file with comments | « sync/syncable/mutable_entry.cc ('k') | sync/syncable/syncable_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 if (specifics.has_encrypted() != is_encrypted) 144 if (specifics.has_encrypted() != is_encrypted)
145 return false; 145 return false;
146 if (specifics.has_encrypted()) { 146 if (specifics.has_encrypted()) {
147 if (child.Get(NON_UNIQUE_NAME) != kEncryptedString) 147 if (child.Get(NON_UNIQUE_NAME) != kEncryptedString)
148 return false; 148 return false;
149 if (!cryptographer->CanDecryptUsingDefaultKey(specifics.encrypted())) 149 if (!cryptographer->CanDecryptUsingDefaultKey(specifics.encrypted()))
150 return false; 150 return false;
151 } 151 }
152 } 152 }
153 // Push the successor. 153 // Push the successor.
154 to_visit.push(child.Get(NEXT_ID)); 154 to_visit.push(child.GetSuccessorId());
155 } 155 }
156 return true; 156 return true;
157 } 157 }
158 158
159 bool UpdateEntryWithEncryption( 159 bool UpdateEntryWithEncryption(
160 BaseTransaction* const trans, 160 BaseTransaction* const trans,
161 const sync_pb::EntitySpecifics& new_specifics, 161 const sync_pb::EntitySpecifics& new_specifics,
162 syncable::MutableEntry* entry) { 162 syncable::MutableEntry* entry) {
163 NigoriHandler* nigori_handler = trans->directory()->GetNigoriHandler(); 163 NigoriHandler* nigori_handler = trans->directory()->GetNigoriHandler();
164 Cryptographer* cryptographer = trans->directory()->GetCryptographer(trans); 164 Cryptographer* cryptographer = trans->directory()->GetCryptographer(trans);
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 encrypted_types.Put(APP_SETTINGS); 308 encrypted_types.Put(APP_SETTINGS);
309 if (nigori.encrypt_apps()) 309 if (nigori.encrypt_apps())
310 encrypted_types.Put(APPS); 310 encrypted_types.Put(APPS);
311 if (nigori.encrypt_app_notifications()) 311 if (nigori.encrypt_app_notifications())
312 encrypted_types.Put(APP_NOTIFICATIONS); 312 encrypted_types.Put(APP_NOTIFICATIONS);
313 return encrypted_types; 313 return encrypted_types;
314 } 314 }
315 315
316 } // namespace syncable 316 } // namespace syncable
317 } // namespace syncer 317 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/syncable/mutable_entry.cc ('k') | sync/syncable/syncable_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698