| 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #include "chrome/browser/sync/glue/sync_backend_host.h" | 7 #include "chrome/browser/sync/glue/sync_backend_host.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 973 options.make_http_bridge_factory_fn.Run().Pass(), | 973 options.make_http_bridge_factory_fn.Run().Pass(), |
| 974 options.routing_info, | 974 options.routing_info, |
| 975 options.workers, | 975 options.workers, |
| 976 options.extensions_activity_monitor, | 976 options.extensions_activity_monitor, |
| 977 options.registrar /* as SyncManager::ChangeDelegate */, | 977 options.registrar /* as SyncManager::ChangeDelegate */, |
| 978 options.credentials, | 978 options.credentials, |
| 979 scoped_ptr<syncer::SyncNotifier>(new BridgedSyncNotifier( | 979 scoped_ptr<syncer::SyncNotifier>(new BridgedSyncNotifier( |
| 980 options.chrome_sync_notification_bridge, | 980 options.chrome_sync_notification_bridge, |
| 981 options.sync_notifier_factory->CreateSyncNotifier())), | 981 options.sync_notifier_factory->CreateSyncNotifier())), |
| 982 options.restored_key_for_bootstrapping, | 982 options.restored_key_for_bootstrapping, |
| 983 CommandLine::ForCurrentProcess()->HasSwitch( |
| 984 switches::kSyncKeystoreEncryption), |
| 983 options.testing_mode, | 985 options.testing_mode, |
| 984 &encryptor_, | 986 &encryptor_, |
| 985 options.unrecoverable_error_handler, | 987 options.unrecoverable_error_handler, |
| 986 options.report_unrecoverable_error_function); | 988 options.report_unrecoverable_error_function); |
| 987 LOG_IF(ERROR, !success) << "Syncapi initialization failed!"; | 989 LOG_IF(ERROR, !success) << "Syncapi initialization failed!"; |
| 988 | 990 |
| 989 // Now check the command line to see if we need to simulate an | 991 // Now check the command line to see if we need to simulate an |
| 990 // unrecoverable error for testing purpose. Note the error is thrown | 992 // unrecoverable error for testing purpose. Note the error is thrown |
| 991 // only if the initialization succeeded. Also it makes sense to use this | 993 // only if the initialization succeeded. Also it makes sense to use this |
| 992 // flag only when restarting the browser with an account already setup. If | 994 // flag only when restarting the browser with an account already setup. If |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1367 FROM_HERE, | 1369 FROM_HERE, |
| 1368 base::Bind(&SyncBackendHost::Core::DoRefreshNigori, | 1370 base::Bind(&SyncBackendHost::Core::DoRefreshNigori, |
| 1369 core_.get(), sync_thread_done_callback)); | 1371 core_.get(), sync_thread_done_callback)); |
| 1370 } | 1372 } |
| 1371 | 1373 |
| 1372 #undef SDVLOG | 1374 #undef SDVLOG |
| 1373 | 1375 |
| 1374 #undef SLOG | 1376 #undef SLOG |
| 1375 | 1377 |
| 1376 } // namespace browser_sync | 1378 } // namespace browser_sync |
| OLD | NEW |