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 "chrome/browser/sync_file_system/sync_file_system_service.h" | 5 #include "chrome/browser/sync_file_system/sync_file_system_service.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 SyncEventObserver, observers_, | 612 SyncEventObserver, observers_, |
613 OnSyncStateUpdated(GURL(), | 613 OnSyncStateUpdated(GURL(), |
614 RemoteStateToSyncServiceState(state), | 614 RemoteStateToSyncServiceState(state), |
615 description)); | 615 description)); |
616 | 616 |
617 RunForEachSyncRunners(&SyncProcessRunner::Schedule); | 617 RunForEachSyncRunners(&SyncProcessRunner::Schedule); |
618 } | 618 } |
619 | 619 |
620 void SyncFileSystemService::OnExtensionInstalled( | 620 void SyncFileSystemService::OnExtensionInstalled( |
621 content::BrowserContext* browser_context, | 621 content::BrowserContext* browser_context, |
622 const Extension* extension) { | 622 const Extension* extension, |
| 623 bool is_update) { |
623 GURL app_origin = Extension::GetBaseURLFromExtensionId(extension->id()); | 624 GURL app_origin = Extension::GetBaseURLFromExtensionId(extension->id()); |
624 DVLOG(1) << "Handle extension notification for INSTALLED: " << app_origin; | 625 DVLOG(1) << "Handle extension notification for INSTALLED: " << app_origin; |
625 // NOTE: When an app is uninstalled and re-installed in a sequence, | 626 // NOTE: When an app is uninstalled and re-installed in a sequence, |
626 // |local_service_| may still keeps |app_origin| as disabled origin. | 627 // |local_service_| may still keeps |app_origin| as disabled origin. |
627 local_service_->SetOriginEnabled(app_origin, true); | 628 local_service_->SetOriginEnabled(app_origin, true); |
628 } | 629 } |
629 | 630 |
630 void SyncFileSystemService::OnExtensionUnloaded( | 631 void SyncFileSystemService::OnExtensionUnloaded( |
631 content::BrowserContext* browser_context, | 632 content::BrowserContext* browser_context, |
632 const Extension* extension, | 633 const Extension* extension, |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 v2_remote_service_->AddServiceObserver(v2_remote_syncer.get()); | 749 v2_remote_service_->AddServiceObserver(v2_remote_syncer.get()); |
749 v2_remote_service_->AddFileStatusObserver(this); | 750 v2_remote_service_->AddFileStatusObserver(this); |
750 v2_remote_service_->SetRemoteChangeProcessor(local_service_.get()); | 751 v2_remote_service_->SetRemoteChangeProcessor(local_service_.get()); |
751 v2_remote_service_->SetSyncEnabled(sync_enabled_); | 752 v2_remote_service_->SetSyncEnabled(sync_enabled_); |
752 remote_sync_runners_.push_back(v2_remote_syncer.release()); | 753 remote_sync_runners_.push_back(v2_remote_syncer.release()); |
753 } | 754 } |
754 return v2_remote_service_.get(); | 755 return v2_remote_service_.get(); |
755 } | 756 } |
756 | 757 |
757 } // namespace sync_file_system | 758 } // namespace sync_file_system |
OLD | NEW |