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

Side by Side Diff: chrome/browser/sync/backend_migrator.cc

Issue 11958029: [Sync] Add support for proxy types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 7 years, 10 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 "chrome/browser/sync/backend_migrator.h" 5 #include "chrome/browser/sync/backend_migrator.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "base/tracked_objects.h" 9 #include "base/tracked_objects.h"
10 #include "chrome/browser/sync/profile_sync_service.h" 10 #include "chrome/browser/sync/profile_sync_service.h"
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 40
41 // Helper macros to log with the syncer thread name; useful when there 41 // Helper macros to log with the syncer thread name; useful when there
42 // are multiple syncer threads involved. 42 // are multiple syncer threads involved.
43 43
44 #define SLOG(severity) LOG(severity) << name_ << ": " 44 #define SLOG(severity) LOG(severity) << name_ << ": "
45 45
46 #define SDVLOG(verbose_level) DVLOG(verbose_level) << name_ << ": " 46 #define SDVLOG(verbose_level) DVLOG(verbose_level) << name_ << ": "
47 47
48 void BackendMigrator::MigrateTypes(syncer::ModelTypeSet types) { 48 void BackendMigrator::MigrateTypes(syncer::ModelTypeSet types) {
49 if (!syncer::Intersection(types, syncer::VirtualTypes()).Empty()) {
50 LOG(WARNING) << "Virtual type migration attempted, dropping local types.";
51 types.RemoveAll(syncer::VirtualTypes());
52 }
49 const ModelTypeSet old_to_migrate = to_migrate_; 53 const ModelTypeSet old_to_migrate = to_migrate_;
50 to_migrate_.PutAll(types); 54 to_migrate_.PutAll(types);
51 SDVLOG(1) << "MigrateTypes called with " << ModelTypeSetToString(types) 55 SDVLOG(1) << "MigrateTypes called with " << ModelTypeSetToString(types)
52 << ", old_to_migrate = " << ModelTypeSetToString(old_to_migrate) 56 << ", old_to_migrate = " << ModelTypeSetToString(old_to_migrate)
53 << ", to_migrate_ = " << ModelTypeSetToString(to_migrate_); 57 << ", to_migrate_ = " << ModelTypeSetToString(to_migrate_);
54 if (old_to_migrate.Equals(to_migrate_)) { 58 if (old_to_migrate.Equals(to_migrate_)) {
55 SDVLOG(1) << "MigrateTypes called with no new types; ignoring"; 59 SDVLOG(1) << "MigrateTypes called with no new types; ignoring";
56 return; 60 return;
57 } 61 }
58 62
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 220
217 syncer::ModelTypeSet BackendMigrator::GetPendingMigrationTypesForTest() const { 221 syncer::ModelTypeSet BackendMigrator::GetPendingMigrationTypesForTest() const {
218 return to_migrate_; 222 return to_migrate_;
219 } 223 }
220 224
221 #undef SDVLOG 225 #undef SDVLOG
222 226
223 #undef SLOG 227 #undef SLOG
224 228
225 }; // namespace browser_sync 229 }; // namespace browser_sync
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/glue/sync_backend_host.cc » ('j') | sync/internal_api/sync_manager_impl_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698