| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 unrecoverable_error_location_.reset( | 597 unrecoverable_error_location_.reset( |
| 598 new tracked_objects::Location(from_here.function_name(), | 598 new tracked_objects::Location(from_here.function_name(), |
| 599 from_here.file_name(), | 599 from_here.file_name(), |
| 600 from_here.line_number(), | 600 from_here.line_number(), |
| 601 from_here.program_counter())); | 601 from_here.program_counter())); |
| 602 | 602 |
| 603 // Tell the wizard so it can inform the user only if it is already open. | 603 // Tell the wizard so it can inform the user only if it is already open. |
| 604 wizard_.Step(SyncSetupWizard::FATAL_ERROR); | 604 wizard_.Step(SyncSetupWizard::FATAL_ERROR); |
| 605 | 605 |
| 606 NotifyObservers(); | 606 NotifyObservers(); |
| 607 LOG(ERROR) << "Unrecoverable error detected -- ProfileSyncService unusable." | |
| 608 << message; | |
| 609 std::string location; | 607 std::string location; |
| 610 from_here.Write(true, true, &location); | 608 from_here.Write(true, true, &location); |
| 611 LOG(ERROR) << location; | 609 LOG(ERROR) |
| 610 << "Unrecoverable error detected at " << location |
| 611 << " -- ProfileSyncService unusable: " << message; |
| 612 | 612 |
| 613 // Shut all data types down. | 613 // Shut all data types down. |
| 614 MessageLoop::current()->PostTask(FROM_HERE, | 614 MessageLoop::current()->PostTask(FROM_HERE, |
| 615 scoped_runnable_method_factory_.NewRunnableMethod( | 615 scoped_runnable_method_factory_.NewRunnableMethod( |
| 616 &ProfileSyncService::Shutdown, true)); | 616 &ProfileSyncService::Shutdown, true)); |
| 617 } | 617 } |
| 618 | 618 |
| 619 void ProfileSyncService::OnBackendInitialized( | 619 void ProfileSyncService::OnBackendInitialized( |
| 620 const WeakHandle<JsBackend>& js_backend, bool success) { | 620 const WeakHandle<JsBackend>& js_backend, bool success) { |
| 621 if (!success) { | 621 if (!success) { |
| (...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1574 *profile_->GetPrefs()->GetList(prefs::kAcknowledgedSyncTypes)); | 1574 *profile_->GetPrefs()->GetList(prefs::kAcknowledgedSyncTypes)); |
| 1575 syncable::ModelTypeSet registered; | 1575 syncable::ModelTypeSet registered; |
| 1576 GetRegisteredDataTypes(®istered); | 1576 GetRegisteredDataTypes(®istered); |
| 1577 syncable::ModelTypeBitSet registered_bit_set = | 1577 syncable::ModelTypeBitSet registered_bit_set = |
| 1578 syncable::ModelTypeBitSetFromSet(registered); | 1578 syncable::ModelTypeBitSetFromSet(registered); |
| 1579 unacknowledged = registered_bit_set & ~acknowledged; | 1579 unacknowledged = registered_bit_set & ~acknowledged; |
| 1580 } | 1580 } |
| 1581 return unacknowledged; | 1581 return unacknowledged; |
| 1582 } | 1582 } |
| 1583 | 1583 |
| OLD | NEW |