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

Side by Side Diff: chrome/browser/sync/glue/sync_backend_registrar.cc

Issue 8289026: Correctly handle expired and truncated visits in typed url sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed a bunch of debug statements/unrelated test code Created 9 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
« no previous file with comments | « no previous file | chrome/browser/sync/glue/typed_url_change_processor.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/sync/glue/sync_backend_registrar.h" 5 #include "chrome/browser/sync/glue/sync_backend_registrar.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstddef> 8 #include <cstddef>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 types_to_remove.begin(), types_to_remove.end(), 116 types_to_remove.begin(), types_to_remove.end(),
117 std::inserter(intersection, intersection.end())); 117 std::inserter(intersection, intersection.end()));
118 DCHECK(intersection.empty()); 118 DCHECK(intersection.empty());
119 } 119 }
120 syncable::ModelTypeSet filtered_types_to_add = types_to_add; 120 syncable::ModelTypeSet filtered_types_to_add = types_to_add;
121 if (workers_.count(GROUP_HISTORY) == 0) { 121 if (workers_.count(GROUP_HISTORY) == 0) {
122 LOG(WARNING) << "No history worker -- removing TYPED_URLS"; 122 LOG(WARNING) << "No history worker -- removing TYPED_URLS";
123 filtered_types_to_add.erase(syncable::TYPED_URLS); 123 filtered_types_to_add.erase(syncable::TYPED_URLS);
124 } 124 }
125 if (workers_.count(GROUP_PASSWORD) == 0) { 125 if (workers_.count(GROUP_PASSWORD) == 0) {
126 LOG(WARNING) << "No history worker -- removing PASSWORDS"; 126 LOG(WARNING) << "No password worker -- removing PASSWORDS";
Andrew T Wilson (Slow) 2011/10/21 13:14:05 This copy/paste error keeps bugging me, so I fixed
127 filtered_types_to_add.erase(syncable::PASSWORDS); 127 filtered_types_to_add.erase(syncable::PASSWORDS);
128 } 128 }
129 129
130 base::AutoLock lock(lock_); 130 base::AutoLock lock(lock_);
131 syncable::ModelTypeSet newly_added_types; 131 syncable::ModelTypeSet newly_added_types;
132 for (syncable::ModelTypeSet::const_iterator it = 132 for (syncable::ModelTypeSet::const_iterator it =
133 filtered_types_to_add.begin(); 133 filtered_types_to_add.begin();
134 it != filtered_types_to_add.end(); ++it) { 134 it != filtered_types_to_add.end(); ++it) {
135 // Add a newly specified data type as GROUP_PASSIVE into the 135 // Add a newly specified data type as GROUP_PASSIVE into the
136 // routing_info, if it does not already exist. 136 // routing_info, if it does not already exist.
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 return it->second; 282 return it->second;
283 } 283 }
284 284
285 bool SyncBackendRegistrar::IsCurrentThreadSafeForModel( 285 bool SyncBackendRegistrar::IsCurrentThreadSafeForModel(
286 syncable::ModelType model_type) const { 286 syncable::ModelType model_type) const {
287 lock_.AssertAcquired(); 287 lock_.AssertAcquired();
288 return IsOnThreadForGroup(GetGroupForModelType(model_type, routing_info_)); 288 return IsOnThreadForGroup(GetGroupForModelType(model_type, routing_info_));
289 } 289 }
290 290
291 } // namespace browser_sync 291 } // namespace browser_sync
292
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/glue/typed_url_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698