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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
721 content::BrowserContext* browser_context, | 721 content::BrowserContext* browser_context, |
722 const Extension* extension) { | 722 const Extension* extension) { |
723 GURL app_origin = Extension::GetBaseURLFromExtensionId(extension->id()); | 723 GURL app_origin = Extension::GetBaseURLFromExtensionId(extension->id()); |
724 DVLOG(1) << "Handle extension notification for LOADED: " << app_origin; | 724 DVLOG(1) << "Handle extension notification for LOADED: " << app_origin; |
725 remote_service_->EnableOrigin( | 725 remote_service_->EnableOrigin( |
726 app_origin, | 726 app_origin, |
727 base::Bind(&DidHandleLoadEvent, app_origin)); | 727 base::Bind(&DidHandleLoadEvent, app_origin)); |
728 local_service_->SetOriginEnabled(app_origin, true); | 728 local_service_->SetOriginEnabled(app_origin, true); |
729 } | 729 } |
730 | 730 |
731 void SyncFileSystemService::OnStateChanged() { | 731 void SyncFileSystemService::OnStateChanged(syncer::SyncService* sync) { |
732 syncer::SyncService* profile_sync_service = | 732 syncer::SyncService* profile_sync_service = |
skym
2017/01/26 23:43:23
This variable can be replaced by |sync|.
Steven Holte
2017/01/27 02:27:19
Done.
| |
733 ProfileSyncServiceFactory::GetSyncServiceForBrowserContext(profile_); | 733 ProfileSyncServiceFactory::GetSyncServiceForBrowserContext(profile_); |
734 if (profile_sync_service) | 734 if (profile_sync_service) |
skym
2017/01/26 23:43:23
Same for this if
Steven Holte
2017/01/27 02:27:19
Done.
| |
735 UpdateSyncEnabledStatus(profile_sync_service); | 735 UpdateSyncEnabledStatus(profile_sync_service); |
736 } | 736 } |
737 | 737 |
738 void SyncFileSystemService::OnFileStatusChanged( | 738 void SyncFileSystemService::OnFileStatusChanged( |
739 const FileSystemURL& url, | 739 const FileSystemURL& url, |
740 SyncFileType file_type, | 740 SyncFileType file_type, |
741 SyncFileStatus sync_status, | 741 SyncFileStatus sync_status, |
742 SyncAction action_taken, | 742 SyncAction action_taken, |
743 SyncDirection direction) { | 743 SyncDirection direction) { |
744 for (auto& observer : observers_) | 744 for (auto& observer : observers_) |
(...skipping 18 matching lines...) Expand all Loading... | |
763 local_sync_runners_.begin(); | 763 local_sync_runners_.begin(); |
764 iter != local_sync_runners_.end(); ++iter) | 764 iter != local_sync_runners_.end(); ++iter) |
765 ((*iter)->*method)(); | 765 ((*iter)->*method)(); |
766 for (ScopedVector<SyncProcessRunner>::iterator iter = | 766 for (ScopedVector<SyncProcessRunner>::iterator iter = |
767 remote_sync_runners_.begin(); | 767 remote_sync_runners_.begin(); |
768 iter != remote_sync_runners_.end(); ++iter) | 768 iter != remote_sync_runners_.end(); ++iter) |
769 ((*iter)->*method)(); | 769 ((*iter)->*method)(); |
770 } | 770 } |
771 | 771 |
772 } // namespace sync_file_system | 772 } // namespace sync_file_system |
OLD | NEW |