| 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 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1473 | 1473 |
| 1474 bool ProfileSyncService::IsFirstSetupInProgress() const { | 1474 bool ProfileSyncService::IsFirstSetupInProgress() const { |
| 1475 return !IsFirstSetupComplete() && startup_controller_->IsSetupInProgress(); | 1475 return !IsFirstSetupComplete() && startup_controller_->IsSetupInProgress(); |
| 1476 } | 1476 } |
| 1477 | 1477 |
| 1478 void ProfileSyncService::SetSetupInProgress(bool setup_in_progress) { | 1478 void ProfileSyncService::SetSetupInProgress(bool setup_in_progress) { |
| 1479 // This method is a no-op if |setup_in_progress_| remains unchanged. | 1479 // This method is a no-op if |setup_in_progress_| remains unchanged. |
| 1480 if (startup_controller_->IsSetupInProgress() == setup_in_progress) | 1480 if (startup_controller_->IsSetupInProgress() == setup_in_progress) |
| 1481 return; | 1481 return; |
| 1482 | 1482 |
| 1483 startup_controller_->set_setup_in_progress(setup_in_progress); | 1483 startup_controller_->SetSetupInProgress(setup_in_progress); |
| 1484 if (!setup_in_progress && IsBackendInitialized()) | 1484 if (!setup_in_progress && IsBackendInitialized()) |
| 1485 ReconfigureDatatypeManager(); | 1485 ReconfigureDatatypeManager(); |
| 1486 NotifyObservers(); | 1486 NotifyObservers(); |
| 1487 } | 1487 } |
| 1488 | 1488 |
| 1489 bool ProfileSyncService::IsSyncAllowed() const { | 1489 bool ProfileSyncService::IsSyncAllowed() const { |
| 1490 return IsSyncAllowedByFlag() && !IsManaged() && IsSyncAllowedByPlatform(); | 1490 return IsSyncAllowedByFlag() && !IsManaged() && IsSyncAllowedByPlatform(); |
| 1491 } | 1491 } |
| 1492 | 1492 |
| 1493 bool ProfileSyncService::IsSyncActive() const { | 1493 bool ProfileSyncService::IsSyncActive() const { |
| (...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2450 } | 2450 } |
| 2451 | 2451 |
| 2452 std::string ProfileSyncService::unrecoverable_error_message() const { | 2452 std::string ProfileSyncService::unrecoverable_error_message() const { |
| 2453 return unrecoverable_error_message_; | 2453 return unrecoverable_error_message_; |
| 2454 } | 2454 } |
| 2455 | 2455 |
| 2456 tracked_objects::Location ProfileSyncService::unrecoverable_error_location() | 2456 tracked_objects::Location ProfileSyncService::unrecoverable_error_location() |
| 2457 const { | 2457 const { |
| 2458 return unrecoverable_error_location_; | 2458 return unrecoverable_error_location_; |
| 2459 } | 2459 } |
| OLD | NEW |