| 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 "components/browser_sync/browser/profile_sync_service.h" | 5 #include "components/browser_sync/browser/profile_sync_service.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <cstddef> | 8 #include <cstddef> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 } | 369 } |
| 370 #endif | 370 #endif |
| 371 | 371 |
| 372 #if !defined(OS_ANDROID) | 372 #if !defined(OS_ANDROID) |
| 373 DCHECK(sync_error_controller_ == NULL) | 373 DCHECK(sync_error_controller_ == NULL) |
| 374 << "Initialize() called more than once."; | 374 << "Initialize() called more than once."; |
| 375 sync_error_controller_.reset(new SyncErrorController(this)); | 375 sync_error_controller_.reset(new SyncErrorController(this)); |
| 376 AddObserver(sync_error_controller_.get()); | 376 AddObserver(sync_error_controller_.get()); |
| 377 #endif | 377 #endif |
| 378 | 378 |
| 379 memory_pressure_listener_.reset(new base::MemoryPressureListener(base::Bind( | 379 memory_pressure_listener_.reset(base::MemoryPressureListener::Create( |
| 380 &ProfileSyncService::OnMemoryPressure, weak_factory_.GetWeakPtr()))); | 380 base::Bind(&ProfileSyncService::OnMemoryPressure, |
| 381 weak_factory_.GetWeakPtr()))); |
| 381 startup_controller_->Reset(GetRegisteredDataTypes()); | 382 startup_controller_->Reset(GetRegisteredDataTypes()); |
| 382 startup_controller_->TryStart(); | 383 startup_controller_->TryStart(); |
| 383 } | 384 } |
| 384 | 385 |
| 385 void ProfileSyncService::TrySyncDatatypePrefRecovery() { | 386 void ProfileSyncService::TrySyncDatatypePrefRecovery() { |
| 386 DCHECK(!IsBackendInitialized()); | 387 DCHECK(!IsBackendInitialized()); |
| 387 if (!IsFirstSetupComplete()) | 388 if (!IsFirstSetupComplete()) |
| 388 return; | 389 return; |
| 389 | 390 |
| 390 // There was a bug where OnUserChoseDatatypes was not properly called on | 391 // There was a bug where OnUserChoseDatatypes was not properly called on |
| (...skipping 2135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2526 } | 2527 } |
| 2527 | 2528 |
| 2528 std::string ProfileSyncService::unrecoverable_error_message() const { | 2529 std::string ProfileSyncService::unrecoverable_error_message() const { |
| 2529 return unrecoverable_error_message_; | 2530 return unrecoverable_error_message_; |
| 2530 } | 2531 } |
| 2531 | 2532 |
| 2532 tracked_objects::Location ProfileSyncService::unrecoverable_error_location() | 2533 tracked_objects::Location ProfileSyncService::unrecoverable_error_location() |
| 2533 const { | 2534 const { |
| 2534 return unrecoverable_error_location_; | 2535 return unrecoverable_error_location_; |
| 2535 } | 2536 } |
| OLD | NEW |