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

Side by Side Diff: sync/internal_api/sync_manager.cc

Issue 10559104: sync: Process 'control' data separately (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename, cleanup, fix tests Created 8 years, 6 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/internal_api/public/syncable/model_type.h ('k') | sync/sessions/sync_session.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 (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/internal_api/public/sync_manager.h" 5 #include "sync/internal_api/public/sync_manager.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after
1559 // which data for some or all types is not currently available. In that case, 1559 // which data for some or all types is not currently available. In that case,
1560 // the lookup of the root node will fail and we will skip encryption for that 1560 // the lookup of the root node will fail and we will skip encryption for that
1561 // type. 1561 // type.
1562 void SyncManager::SyncInternal::ReEncryptEverything(WriteTransaction* trans) { 1562 void SyncManager::SyncInternal::ReEncryptEverything(WriteTransaction* trans) {
1563 Cryptographer* cryptographer = trans->GetCryptographer(); 1563 Cryptographer* cryptographer = trans->GetCryptographer();
1564 if (!cryptographer || !cryptographer->is_ready()) 1564 if (!cryptographer || !cryptographer->is_ready())
1565 return; 1565 return;
1566 syncable::ModelTypeSet encrypted_types = GetEncryptedTypes(trans); 1566 syncable::ModelTypeSet encrypted_types = GetEncryptedTypes(trans);
1567 for (syncable::ModelTypeSet::Iterator iter = encrypted_types.First(); 1567 for (syncable::ModelTypeSet::Iterator iter = encrypted_types.First();
1568 iter.Good(); iter.Inc()) { 1568 iter.Good(); iter.Inc()) {
1569 if (iter.Get() == syncable::PASSWORDS || 1569 if (iter.Get() == syncable::PASSWORDS || IsControlType(iter.Get()))
1570 iter.Get() == syncable::NIGORI)
1571 continue; // These types handle encryption differently. 1570 continue; // These types handle encryption differently.
1572 1571
1573 ReadNode type_root(trans); 1572 ReadNode type_root(trans);
1574 std::string tag = syncable::ModelTypeToRootTag(iter.Get()); 1573 std::string tag = syncable::ModelTypeToRootTag(iter.Get());
1575 if (type_root.InitByTagLookup(tag) != csync::BaseNode::INIT_OK) 1574 if (type_root.InitByTagLookup(tag) != csync::BaseNode::INIT_OK)
1576 continue; // Don't try to reencrypt if the type's data is unavailable. 1575 continue; // Don't try to reencrypt if the type's data is unavailable.
1577 1576
1578 // Iterate through all children of this datatype. 1577 // Iterate through all children of this datatype.
1579 std::queue<int64> to_visit; 1578 std::queue<int64> to_visit;
1580 int64 child_id = type_root.GetFirstChildId(); 1579 int64 child_id = type_root.GetFirstChildId();
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
2482 share->directory->GetDownloadProgress(i.Get(), &marker); 2481 share->directory->GetDownloadProgress(i.Get(), &marker);
2483 2482
2484 if (marker.token().empty()) 2483 if (marker.token().empty())
2485 result.Put(i.Get()); 2484 result.Put(i.Get());
2486 2485
2487 } 2486 }
2488 return result; 2487 return result;
2489 } 2488 }
2490 2489
2491 } // namespace csync 2490 } // namespace csync
OLDNEW
« no previous file with comments | « sync/internal_api/public/syncable/model_type.h ('k') | sync/sessions/sync_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698