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 "chrome/browser/sync/profile_sync_service.h" | 5 #include "chrome/browser/sync/profile_sync_service.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 MakeWeakHandle(weak_factory_.GetWeakPtr()))); | 516 MakeWeakHandle(weak_factory_.GetWeakPtr()))); |
517 | 517 |
518 backend_->Initialize( | 518 backend_->Initialize( |
519 this, | 519 this, |
520 sync_thread_.Pass(), | 520 sync_thread_.Pass(), |
521 GetJsEventHandler(), | 521 GetJsEventHandler(), |
522 sync_service_url_, | 522 sync_service_url_, |
523 credentials, | 523 credentials, |
524 delete_stale_data, | 524 delete_stale_data, |
525 scoped_ptr<syncer::SyncManagerFactory>( | 525 scoped_ptr<syncer::SyncManagerFactory>( |
526 new syncer::SyncManagerFactory).Pass(), | 526 new syncer::SyncManagerFactory( |
| 527 syncer::SyncManagerFactory::NORMAL)).Pass(), |
527 backend_unrecoverable_error_handler.Pass(), | 528 backend_unrecoverable_error_handler.Pass(), |
528 &browser_sync::ChromeReportUnrecoverableError, | 529 &browser_sync::ChromeReportUnrecoverableError, |
529 network_resources_.get()); | 530 network_resources_.get()); |
530 } | 531 } |
531 | 532 |
532 bool ProfileSyncService::IsEncryptedDatatypeEnabled() const { | 533 bool ProfileSyncService::IsEncryptedDatatypeEnabled() const { |
533 if (encryption_pending()) | 534 if (encryption_pending()) |
534 return true; | 535 return true; |
535 const syncer::ModelTypeSet preferred_types = GetPreferredDataTypes(); | 536 const syncer::ModelTypeSet preferred_types = GetPreferredDataTypes(); |
536 const syncer::ModelTypeSet encrypted_types = GetEncryptedDataTypes(); | 537 const syncer::ModelTypeSet encrypted_types = GetEncryptedDataTypes(); |
(...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2370 status.last_get_token_error = last_get_token_error_; | 2371 status.last_get_token_error = last_get_token_error_; |
2371 if (request_access_token_retry_timer_.IsRunning()) | 2372 if (request_access_token_retry_timer_.IsRunning()) |
2372 status.next_token_request_time = next_token_request_time_; | 2373 status.next_token_request_time = next_token_request_time_; |
2373 return status; | 2374 return status; |
2374 } | 2375 } |
2375 | 2376 |
2376 void ProfileSyncService::OverrideNetworkResourcesForTest( | 2377 void ProfileSyncService::OverrideNetworkResourcesForTest( |
2377 scoped_ptr<syncer::NetworkResources> network_resources) { | 2378 scoped_ptr<syncer::NetworkResources> network_resources) { |
2378 network_resources_ = network_resources.Pass(); | 2379 network_resources_ = network_resources.Pass(); |
2379 } | 2380 } |
OLD | NEW |