OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/sync/driver/glue/sync_backend_host_impl.h" | 5 #include "components/sync/driver/glue/sync_backend_host_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 #define SDVLOG(verbose_level) DVLOG(verbose_level) << name_ << ": " | 41 #define SDVLOG(verbose_level) DVLOG(verbose_level) << name_ << ": " |
42 | 42 |
43 namespace syncer { | 43 namespace syncer { |
44 | 44 |
45 SyncBackendHostImpl::SyncBackendHostImpl( | 45 SyncBackendHostImpl::SyncBackendHostImpl( |
46 const std::string& name, | 46 const std::string& name, |
47 SyncClient* sync_client, | 47 SyncClient* sync_client, |
48 invalidation::InvalidationService* invalidator, | 48 invalidation::InvalidationService* invalidator, |
49 const base::WeakPtr<SyncPrefs>& sync_prefs, | 49 const base::WeakPtr<SyncPrefs>& sync_prefs, |
50 const base::FilePath& sync_folder) | 50 const base::FilePath& sync_data_folder) |
51 : sync_client_(sync_client), | 51 : sync_client_(sync_client), |
52 name_(name), | 52 name_(name), |
53 sync_prefs_(sync_prefs), | 53 sync_prefs_(sync_prefs), |
54 invalidator_(invalidator), | 54 invalidator_(invalidator), |
55 weak_ptr_factory_(this) { | 55 weak_ptr_factory_(this) { |
56 core_ = new SyncBackendHostCore(name_, sync_folder, | 56 core_ = new SyncBackendHostCore(name_, sync_data_folder, |
57 weak_ptr_factory_.GetWeakPtr()); | 57 weak_ptr_factory_.GetWeakPtr()); |
58 } | 58 } |
59 | 59 |
60 SyncBackendHostImpl::~SyncBackendHostImpl() { | 60 SyncBackendHostImpl::~SyncBackendHostImpl() { |
61 DCHECK(!core_.get() && !host_) << "Must call Shutdown before destructor."; | 61 DCHECK(!core_.get() && !host_) << "Must call Shutdown before destructor."; |
62 DCHECK(!registrar_); | 62 DCHECK(!registrar_); |
63 } | 63 } |
64 | 64 |
65 void SyncBackendHostImpl::Initialize(InitParams params) { | 65 void SyncBackendHostImpl::Initialize(InitParams params) { |
66 CHECK(params.sync_task_runner); | 66 CHECK(params.sync_task_runner); |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 const SyncManager::ClearServerDataCallback& frontend_callback) { | 691 const SyncManager::ClearServerDataCallback& frontend_callback) { |
692 DCHECK(thread_checker_.CalledOnValidThread()); | 692 DCHECK(thread_checker_.CalledOnValidThread()); |
693 frontend_callback.Run(); | 693 frontend_callback.Run(); |
694 } | 694 } |
695 | 695 |
696 } // namespace syncer | 696 } // namespace syncer |
697 | 697 |
698 #undef SDVLOG | 698 #undef SDVLOG |
699 | 699 |
700 #undef SLOG | 700 #undef SLOG |
OLD | NEW |