| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_file_system/drive_backend/sync_engine.h" | 5 #include "chrome/browser/sync_file_system/drive_backend/sync_engine.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/threading/sequenced_worker_pool.h" | 8 #include "base/threading/sequenced_worker_pool.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/drive/drive_api_service.h" | 10 #include "chrome/browser/drive/drive_api_service.h" |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 } | 651 } |
| 652 | 652 |
| 653 void SyncEngine::UpdateServiceState(RemoteServiceState state, | 653 void SyncEngine::UpdateServiceState(RemoteServiceState state, |
| 654 const std::string& description) { | 654 const std::string& description) { |
| 655 RemoteServiceState old_state = GetCurrentState(); | 655 RemoteServiceState old_state = GetCurrentState(); |
| 656 service_state_ = state; | 656 service_state_ = state; |
| 657 | 657 |
| 658 if (old_state == GetCurrentState()) | 658 if (old_state == GetCurrentState()) |
| 659 return; | 659 return; |
| 660 | 660 |
| 661 util::Log(logging::LOG_INFO, FROM_HERE, | 661 util::Log(logging::LOG_VERBOSE, FROM_HERE, |
| 662 "Service state changed: %d->%d: %s", | 662 "Service state changed: %d->%d: %s", |
| 663 old_state, GetCurrentState(), description.c_str()); | 663 old_state, GetCurrentState(), description.c_str()); |
| 664 FOR_EACH_OBSERVER( | 664 FOR_EACH_OBSERVER( |
| 665 Observer, service_observers_, | 665 Observer, service_observers_, |
| 666 OnRemoteServiceStateUpdated(GetCurrentState(), description)); | 666 OnRemoteServiceStateUpdated(GetCurrentState(), description)); |
| 667 } | 667 } |
| 668 | 668 |
| 669 void SyncEngine::UpdateRegisteredApps() { | 669 void SyncEngine::UpdateRegisteredApps() { |
| 670 if (!extension_service_) | 670 if (!extension_service_) |
| 671 return; | 671 return; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 699 tracker.tracker_kind() == TRACKER_KIND_APP_ROOT; | 699 tracker.tracker_kind() == TRACKER_KIND_APP_ROOT; |
| 700 if (is_app_enabled && !is_app_root_tracker_enabled) | 700 if (is_app_enabled && !is_app_root_tracker_enabled) |
| 701 EnableOrigin(origin, base::Bind(&EmptyStatusCallback)); | 701 EnableOrigin(origin, base::Bind(&EmptyStatusCallback)); |
| 702 else if (!is_app_enabled && is_app_root_tracker_enabled) | 702 else if (!is_app_enabled && is_app_root_tracker_enabled) |
| 703 DisableOrigin(origin, base::Bind(&EmptyStatusCallback)); | 703 DisableOrigin(origin, base::Bind(&EmptyStatusCallback)); |
| 704 } | 704 } |
| 705 } | 705 } |
| 706 | 706 |
| 707 } // namespace drive_backend | 707 } // namespace drive_backend |
| 708 } // namespace sync_file_system | 708 } // namespace sync_file_system |
| OLD | NEW |