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

Side by Side Diff: components/browser_sync/abstract_profile_sync_service_test.cc

Issue 2563883006: [Sync] Separate purge types step from sync manager configuration. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | components/sync/driver/glue/sync_backend_host_core.h » ('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) 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 "components/browser_sync/abstract_profile_sync_service_test.h" 5 #include "components/browser_sync/abstract_profile_sync_service_test.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 26 matching lines...) Expand all
37 const base::FilePath& temp_dir, 37 const base::FilePath& temp_dir,
38 syncer::SyncClient* sync_client, 38 syncer::SyncClient* sync_client,
39 invalidation::InvalidationService* invalidator, 39 invalidation::InvalidationService* invalidator,
40 const base::WeakPtr<syncer::SyncPrefs>& sync_prefs, 40 const base::WeakPtr<syncer::SyncPrefs>& sync_prefs,
41 const base::Closure& callback); 41 const base::Closure& callback);
42 ~SyncEngineForProfileSyncTest() override; 42 ~SyncEngineForProfileSyncTest() override;
43 43
44 void RequestConfigureSyncer( 44 void RequestConfigureSyncer(
45 syncer::ConfigureReason reason, 45 syncer::ConfigureReason reason,
46 syncer::ModelTypeSet to_download, 46 syncer::ModelTypeSet to_download,
47 syncer::ModelTypeSet to_purge,
48 syncer::ModelTypeSet to_journal,
49 syncer::ModelTypeSet to_unapply,
50 syncer::ModelTypeSet to_ignore,
51 const syncer::ModelSafeRoutingInfo& routing_info, 47 const syncer::ModelSafeRoutingInfo& routing_info,
52 const base::Callback<void(syncer::ModelTypeSet, syncer::ModelTypeSet)>& 48 const base::Callback<void(syncer::ModelTypeSet, syncer::ModelTypeSet)>&
53 ready_task, 49 ready_task,
54 const base::Closure& retry_callback) override; 50 const base::Closure& retry_callback) override;
55 51
56 protected: 52 protected:
57 void InitCore(std::unique_ptr<syncer::DoInitializeOptions> options) override; 53 void InitCore(std::unique_ptr<syncer::DoInitializeOptions> options) override;
58 54
59 private: 55 private:
60 // Invoked at the start of HandleSyncManagerInitializationOnFrontendLoop. 56 // Invoked at the start of HandleSyncManagerInitializationOnFrontendLoop.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 base::MakeUnique<syncer::TestEngineComponentsFactory>( 96 base::MakeUnique<syncer::TestEngineComponentsFactory>(
101 factory_switches, syncer::EngineComponentsFactory::STORAGE_IN_MEMORY, 97 factory_switches, syncer::EngineComponentsFactory::STORAGE_IN_MEMORY,
102 nullptr); 98 nullptr);
103 99
104 SyncBackendHostImpl::InitCore(std::move(options)); 100 SyncBackendHostImpl::InitCore(std::move(options));
105 } 101 }
106 102
107 void SyncEngineForProfileSyncTest::RequestConfigureSyncer( 103 void SyncEngineForProfileSyncTest::RequestConfigureSyncer(
108 syncer::ConfigureReason reason, 104 syncer::ConfigureReason reason,
109 syncer::ModelTypeSet to_download, 105 syncer::ModelTypeSet to_download,
110 syncer::ModelTypeSet to_purge,
111 syncer::ModelTypeSet to_journal,
112 syncer::ModelTypeSet to_unapply,
113 syncer::ModelTypeSet to_ignore,
114 const syncer::ModelSafeRoutingInfo& routing_info, 106 const syncer::ModelSafeRoutingInfo& routing_info,
115 const base::Callback<void(syncer::ModelTypeSet, syncer::ModelTypeSet)>& 107 const base::Callback<void(syncer::ModelTypeSet, syncer::ModelTypeSet)>&
116 ready_task, 108 ready_task,
117 const base::Closure& retry_callback) { 109 const base::Closure& retry_callback) {
118 syncer::ModelTypeSet failed_configuration_types; 110 syncer::ModelTypeSet failed_configuration_types;
119 111
120 // The first parameter there should be the set of enabled types. That's not 112 // The first parameter there should be the set of enabled types. That's not
121 // something we have access to from this strange test harness. We'll just 113 // something we have access to from this strange test harness. We'll just
122 // send back the list of newly configured types instead and hope it doesn't 114 // send back the list of newly configured types instead and hope it doesn't
123 // break anything. 115 // break anything.
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 216
225 bool CreateRootHelper::success() { 217 bool CreateRootHelper::success() {
226 return success_; 218 return success_;
227 } 219 }
228 220
229 void CreateRootHelper::CreateRootCallback() { 221 void CreateRootHelper::CreateRootCallback() {
230 success_ = test_->CreateRoot(model_type_); 222 success_ = test_->CreateRoot(model_type_);
231 } 223 }
232 224
233 } // namespace browser_sync 225 } // namespace browser_sync
OLDNEW
« no previous file with comments | « no previous file | components/sync/driver/glue/sync_backend_host_core.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698