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

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

Issue 10825137: FYI: Control Data + Per-Device Metadata (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/internal_api/sync_manager_impl.h" 5 #include "sync/internal_api/sync_manager_impl.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 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 // the lookup of the root node will fail and we will skip encryption for that 1103 // the lookup of the root node will fail and we will skip encryption for that
1104 // type. 1104 // type.
1105 void SyncManagerImpl::ReEncryptEverything( 1105 void SyncManagerImpl::ReEncryptEverything(
1106 WriteTransaction* trans) { 1106 WriteTransaction* trans) {
1107 Cryptographer* cryptographer = trans->GetCryptographer(); 1107 Cryptographer* cryptographer = trans->GetCryptographer();
1108 if (!cryptographer || !cryptographer->is_ready()) 1108 if (!cryptographer || !cryptographer->is_ready())
1109 return; 1109 return;
1110 ModelTypeSet encrypted_types = GetEncryptedTypes(trans); 1110 ModelTypeSet encrypted_types = GetEncryptedTypes(trans);
1111 for (ModelTypeSet::Iterator iter = encrypted_types.First(); 1111 for (ModelTypeSet::Iterator iter = encrypted_types.First();
1112 iter.Good(); iter.Inc()) { 1112 iter.Good(); iter.Inc()) {
1113 if (iter.Get() == PASSWORDS || iter.Get() == NIGORI) 1113 if (iter.Get() == PASSWORDS || IsControlType(iter.Get()))
1114 continue; // These types handle encryption differently. 1114 continue; // These types handle encryption differently.
1115 1115
1116 ReadNode type_root(trans); 1116 ReadNode type_root(trans);
1117 std::string tag = ModelTypeToRootTag(iter.Get()); 1117 std::string tag = ModelTypeToRootTag(iter.Get());
1118 if (type_root.InitByTagLookup(tag) != BaseNode::INIT_OK) 1118 if (type_root.InitByTagLookup(tag) != BaseNode::INIT_OK)
1119 continue; // Don't try to reencrypt if the type's data is unavailable. 1119 continue; // Don't try to reencrypt if the type's data is unavailable.
1120 1120
1121 // Iterate through all children of this datatype. 1121 // Iterate through all children of this datatype.
1122 std::queue<int64> to_visit; 1122 std::queue<int64> to_visit;
1123 int64 child_id = type_root.GetFirstChildId(); 1123 int64 child_id = type_root.GetFirstChildId();
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
1869 int SyncManagerImpl::GetDefaultNudgeDelay() { 1869 int SyncManagerImpl::GetDefaultNudgeDelay() {
1870 return kDefaultNudgeDelayMilliseconds; 1870 return kDefaultNudgeDelayMilliseconds;
1871 } 1871 }
1872 1872
1873 // static. 1873 // static.
1874 int SyncManagerImpl::GetPreferencesNudgeDelay() { 1874 int SyncManagerImpl::GetPreferencesNudgeDelay() {
1875 return kPreferencesNudgeDelayMilliseconds; 1875 return kPreferencesNudgeDelayMilliseconds;
1876 } 1876 }
1877 1877
1878 } // namespace syncer 1878 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698