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

Side by Side Diff: sync/internal_api/test/fake_sync_manager.cc

Issue 10817023: [Sync] Pass the correct set of enabled types to the sync notifier (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 5 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 | « sync/internal_api/public/test/fake_sync_manager.h ('k') | no next file » | 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 "sync/internal_api/public/test/fake_sync_manager.h" 5 #include "sync/internal_api/public/test/fake_sync_manager.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "sync/internal_api/public/http_post_provider_factory.h" 8 #include "sync/internal_api/public/http_post_provider_factory.h"
9 #include "sync/internal_api/public/internal_components_factory.h" 9 #include "sync/internal_api/public/internal_components_factory.h"
10 #include "sync/internal_api/public/util/weak_handle.h" 10 #include "sync/internal_api/public/util/weak_handle.h"
(...skipping 24 matching lines...) Expand all
35 cleaned_types_.Clear(); 35 cleaned_types_.Clear();
36 return cleaned_types; 36 return cleaned_types;
37 } 37 }
38 38
39 ModelTypeSet FakeSyncManager::GetAndResetDownloadedTypes() { 39 ModelTypeSet FakeSyncManager::GetAndResetDownloadedTypes() {
40 ModelTypeSet downloaded_types = downloaded_types_; 40 ModelTypeSet downloaded_types = downloaded_types_;
41 downloaded_types_.Clear(); 41 downloaded_types_.Clear();
42 return downloaded_types; 42 return downloaded_types;
43 } 43 }
44 44
45 ModelTypeSet FakeSyncManager::GetAndResetEnabledTypes() {
46 ModelTypeSet enabled_types = enabled_types_;
47 enabled_types_.Clear();
48 return enabled_types;
49 }
50
45 bool FakeSyncManager::Init( 51 bool FakeSyncManager::Init(
46 const FilePath& database_location, 52 const FilePath& database_location,
47 const WeakHandle<JsEventHandler>& event_handler, 53 const WeakHandle<JsEventHandler>& event_handler,
48 const std::string& sync_server_and_path, 54 const std::string& sync_server_and_path,
49 int sync_server_port, 55 int sync_server_port,
50 bool use_ssl, 56 bool use_ssl,
51 const scoped_refptr<base::TaskRunner>& blocking_task_runner, 57 const scoped_refptr<base::TaskRunner>& blocking_task_runner,
52 scoped_ptr<HttpPostProviderFactory> post_factory, 58 scoped_ptr<HttpPostProviderFactory> post_factory,
53 const ModelSafeRoutingInfo& model_safe_routing_info, 59 const ModelSafeRoutingInfo& model_safe_routing_info,
54 const std::vector<ModelSafeWorker*>& workers, 60 const std::vector<ModelSafeWorker*>& workers,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 101 }
96 progress_marker_types_.RemoveAll(partial_types); 102 progress_marker_types_.RemoveAll(partial_types);
97 return true; 103 return true;
98 } 104 }
99 105
100 void FakeSyncManager::UpdateCredentials(const SyncCredentials& credentials) { 106 void FakeSyncManager::UpdateCredentials(const SyncCredentials& credentials) {
101 NOTIMPLEMENTED(); 107 NOTIMPLEMENTED();
102 } 108 }
103 109
104 void FakeSyncManager::UpdateEnabledTypes(const ModelTypeSet& types) { 110 void FakeSyncManager::UpdateEnabledTypes(const ModelTypeSet& types) {
105 // Do nothing. 111 enabled_types_ = types;
106 } 112 }
107 113
108 void FakeSyncManager::StartSyncingNormally( 114 void FakeSyncManager::StartSyncingNormally(
109 const ModelSafeRoutingInfo& routing_info) { 115 const ModelSafeRoutingInfo& routing_info) {
110 // Do nothing. 116 // Do nothing.
111 } 117 }
112 118
113 void FakeSyncManager::SetEncryptionPassphrase(const std::string& passphrase, 119 void FakeSyncManager::SetEncryptionPassphrase(const std::string& passphrase,
114 bool is_explicit) { 120 bool is_explicit) {
115 NOTIMPLEMENTED(); 121 NOTIMPLEMENTED();
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 return false; 206 return false;
201 } 207 }
202 208
203 bool FakeSyncManager::HasUnsyncedItems() { 209 bool FakeSyncManager::HasUnsyncedItems() {
204 NOTIMPLEMENTED(); 210 NOTIMPLEMENTED();
205 return false; 211 return false;
206 } 212 }
207 213
208 } // namespace syncer 214 } // namespace syncer
209 215
OLDNEW
« no previous file with comments | « sync/internal_api/public/test/fake_sync_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698