OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/sync/profile_sync_service.h" | 5 #include "chrome/browser/sync/profile_sync_service.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cstddef> | 8 #include <cstddef> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 SyncCredentials credentials = GetCredentials(); | 304 SyncCredentials credentials = GetCredentials(); |
305 | 305 |
306 scoped_refptr<net::URLRequestContextGetter> request_context_getter( | 306 scoped_refptr<net::URLRequestContextGetter> request_context_getter( |
307 profile_->GetRequestContext()); | 307 profile_->GetRequestContext()); |
308 | 308 |
309 if (delete_stale_data) | 309 if (delete_stale_data) |
310 ClearStaleErrors(); | 310 ClearStaleErrors(); |
311 | 311 |
312 backend_->Initialize( | 312 backend_->Initialize( |
313 this, | 313 this, |
314 WeakHandle<JsEventHandler>(sync_js_controller_.AsWeakPtr()), | 314 MakeWeakHandle(sync_js_controller_.AsWeakPtr()), |
315 sync_service_url_, | 315 sync_service_url_, |
316 initial_types, | 316 initial_types, |
317 credentials, | 317 credentials, |
318 delete_stale_data); | 318 delete_stale_data); |
319 } | 319 } |
320 | 320 |
321 void ProfileSyncService::CreateBackend() { | 321 void ProfileSyncService::CreateBackend() { |
322 backend_.reset( | 322 backend_.reset( |
323 new SyncBackendHost(profile_->GetDebugName(), | 323 new SyncBackendHost(profile_->GetDebugName(), |
324 profile_, sync_prefs_.AsWeakPtr())); | 324 profile_, sync_prefs_.AsWeakPtr())); |
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1544 << "Unrecoverable error."; | 1544 << "Unrecoverable error."; |
1545 } else { | 1545 } else { |
1546 VLOG(0) << "ConfigureDataTypeManager not invoked because backend is not " | 1546 VLOG(0) << "ConfigureDataTypeManager not invoked because backend is not " |
1547 << "initialized"; | 1547 << "initialized"; |
1548 } | 1548 } |
1549 } | 1549 } |
1550 | 1550 |
1551 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() { | 1551 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() { |
1552 return failed_datatypes_handler_; | 1552 return failed_datatypes_handler_; |
1553 } | 1553 } |
OLD | NEW |