OLD | NEW |
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/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/tracked_objects.h" | 9 #include "base/tracked_objects.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 MigrationObserver::~MigrationObserver() {} | 25 MigrationObserver::~MigrationObserver() {} |
26 | 26 |
27 BackendMigrator::BackendMigrator(const std::string& name, | 27 BackendMigrator::BackendMigrator(const std::string& name, |
28 syncer::UserShare* user_share, | 28 syncer::UserShare* user_share, |
29 ProfileSyncService* service, | 29 ProfileSyncService* service, |
30 DataTypeManager* manager, | 30 DataTypeManager* manager, |
31 const base::Closure &migration_done_callback) | 31 const base::Closure &migration_done_callback) |
32 : name_(name), user_share_(user_share), service_(service), | 32 : name_(name), user_share_(user_share), service_(service), |
33 manager_(manager), state_(IDLE), | 33 manager_(manager), state_(IDLE), |
34 weak_ptr_factory_(this), | 34 migration_done_callback_(migration_done_callback), |
35 migration_done_callback_(migration_done_callback) { | 35 weak_ptr_factory_(this) { |
36 } | 36 } |
37 | 37 |
38 BackendMigrator::~BackendMigrator() { | 38 BackendMigrator::~BackendMigrator() { |
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 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 | 216 |
217 syncer::ModelTypeSet BackendMigrator::GetPendingMigrationTypesForTest() const { | 217 syncer::ModelTypeSet BackendMigrator::GetPendingMigrationTypesForTest() const { |
218 return to_migrate_; | 218 return to_migrate_; |
219 } | 219 } |
220 | 220 |
221 #undef SDVLOG | 221 #undef SDVLOG |
222 | 222 |
223 #undef SLOG | 223 #undef SLOG |
224 | 224 |
225 }; // namespace browser_sync | 225 }; // namespace browser_sync |
OLD | NEW |