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

Unified Diff: chrome/browser/sync/glue/sync_backend_host.cc

Issue 10701046: sync: Remove SyncManager::TestingMode in favour of InternalComponentsFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/glue/sync_backend_host.cc
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
index ce1507d8eb5cac7a019ea03b2cd7a94256e3a6e0..fdc145824fda2a5b0191f25581a1351433df7d94 100644
--- a/chrome/browser/sync/glue/sync_backend_host.cc
+++ b/chrome/browser/sync/glue/sync_backend_host.cc
@@ -42,6 +42,7 @@
#include "net/url_request/url_request_context_getter.h"
#include "sync/internal_api/public/base_transaction.h"
#include "sync/internal_api/public/engine/model_safe_worker.h"
+#include "sync/internal_api/public/internal_components_factory_impl.h"
#include "sync/internal_api/public/http_bridge.h"
#include "sync/internal_api/public/read_transaction.h"
#include "sync/internal_api/public/util/experiments.h"
@@ -61,6 +62,8 @@ typedef GoogleServiceAuthError AuthError;
namespace browser_sync {
using content::BrowserThread;
+using syncer::InternalComponentsFactory;
+using syncer::InternalComponentsFactoryImpl;
using syncer::sessions::SyncSessionSnapshot;
using syncer::SyncCredentials;
@@ -406,7 +409,7 @@ void SyncBackendHost::Initialize(
&sync_notifier_factory_,
delete_sync_data_folder,
sync_prefs_->GetEncryptionBootstrapToken(),
- syncer::SyncManager::NON_TEST,
+ new InternalComponentsFactoryImpl(),
Nicolas Zea 2012/07/18 21:10:12 does it make more sense to have an internal compon
tim (not reviewing) 2012/07/18 21:57:47 I don't think so, because this is only needed for
unrecoverable_error_handler,
report_unrecoverable_error_function));
}
@@ -774,7 +777,7 @@ SyncBackendHost::DoInitializeOptions::DoInitializeOptions(
syncer::SyncNotifierFactory* sync_notifier_factory,
bool delete_sync_data_folder,
const std::string& restored_key_for_bootstrapping,
- syncer::SyncManager::TestingMode testing_mode,
+ InternalComponentsFactory* internal_components_factory,
syncer::UnrecoverableErrorHandler* unrecoverable_error_handler,
syncer::ReportUnrecoverableErrorFunction
report_unrecoverable_error_function)
@@ -791,7 +794,7 @@ SyncBackendHost::DoInitializeOptions::DoInitializeOptions(
sync_notifier_factory(sync_notifier_factory),
delete_sync_data_folder(delete_sync_data_folder),
restored_key_for_bootstrapping(restored_key_for_bootstrapping),
- testing_mode(testing_mode),
+ internal_components_factory(internal_components_factory),
unrecoverable_error_handler(unrecoverable_error_handler),
report_unrecoverable_error_function(
report_unrecoverable_error_function) {
@@ -974,7 +977,8 @@ void SyncBackendHost::Core::DoInitialize(const DoInitializeOptions& options) {
options.chrome_sync_notification_bridge,
options.sync_notifier_factory->CreateSyncNotifier()),
options.restored_key_for_bootstrapping,
- options.testing_mode,
+ scoped_ptr<InternalComponentsFactory>(
+ options.internal_components_factory),
&encryptor_,
options.unrecoverable_error_handler,
options.report_unrecoverable_error_function);

Powered by Google App Engine
This is Rietveld 408576698