| 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 <ostream> | 9 #include <ostream> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 unrecoverable_error_location_.reset( | 558 unrecoverable_error_location_.reset( |
| 559 new tracked_objects::Location(from_here.function_name(), | 559 new tracked_objects::Location(from_here.function_name(), |
| 560 from_here.file_name(), | 560 from_here.file_name(), |
| 561 from_here.line_number(), | 561 from_here.line_number(), |
| 562 from_here.program_counter())); | 562 from_here.program_counter())); |
| 563 | 563 |
| 564 // Tell the wizard so it can inform the user only if it is already open. | 564 // Tell the wizard so it can inform the user only if it is already open. |
| 565 wizard_.Step(SyncSetupWizard::FATAL_ERROR); | 565 wizard_.Step(SyncSetupWizard::FATAL_ERROR); |
| 566 | 566 |
| 567 NotifyObservers(); | 567 NotifyObservers(); |
| 568 LOG(ERROR) << "Unrecoverable error detected -- ProfileSyncService unusable." | |
| 569 << message; | |
| 570 std::string location; | 568 std::string location; |
| 571 from_here.Write(true, true, &location); | 569 from_here.Write(true, true, &location); |
| 572 LOG(ERROR) << location; | 570 LOG(ERROR) |
| 571 << "Unrecoverable error detected at " << location |
| 572 << " -- ProfileSyncService unusable: " << message; |
| 573 | 573 |
| 574 // Shut all data types down. | 574 // Shut all data types down. |
| 575 MessageLoop::current()->PostTask(FROM_HERE, | 575 MessageLoop::current()->PostTask(FROM_HERE, |
| 576 scoped_runnable_method_factory_.NewRunnableMethod( | 576 scoped_runnable_method_factory_.NewRunnableMethod( |
| 577 &ProfileSyncService::Shutdown, true)); | 577 &ProfileSyncService::Shutdown, true)); |
| 578 } | 578 } |
| 579 | 579 |
| 580 void ProfileSyncService::OnBackendInitialized( | 580 void ProfileSyncService::OnBackendInitialized( |
| 581 const WeakHandle<JsBackend>& js_backend, bool success) { | 581 const WeakHandle<JsBackend>& js_backend, bool success) { |
| 582 if (!success) { | 582 if (!success) { |
| (...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1461 *profile_->GetPrefs()->GetList(prefs::kAcknowledgedSyncTypes)); | 1461 *profile_->GetPrefs()->GetList(prefs::kAcknowledgedSyncTypes)); |
| 1462 syncable::ModelTypeSet registered; | 1462 syncable::ModelTypeSet registered; |
| 1463 GetRegisteredDataTypes(®istered); | 1463 GetRegisteredDataTypes(®istered); |
| 1464 syncable::ModelTypeBitSet registered_bit_set = | 1464 syncable::ModelTypeBitSet registered_bit_set = |
| 1465 syncable::ModelTypeBitSetFromSet(registered); | 1465 syncable::ModelTypeBitSetFromSet(registered); |
| 1466 unacknowledged = registered_bit_set & ~acknowledged; | 1466 unacknowledged = registered_bit_set & ~acknowledged; |
| 1467 } | 1467 } |
| 1468 return unacknowledged; | 1468 return unacknowledged; |
| 1469 } | 1469 } |
| 1470 | 1470 |
| OLD | NEW |