| 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" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/stl_util.h" | 13 #include "base/stl_util.h" |
| 14 #include "chrome/browser/chrome_notification_types.h" | 14 #include "chrome/browser/chrome_notification_types.h" |
| 15 #include "chrome/browser/extensions/api/sync_file_system/extension_sync_event_ob
server.h" | 15 #include "chrome/browser/extensions/api/sync_file_system/extension_sync_event_ob
server.h" |
| 16 #include "chrome/browser/extensions/api/sync_file_system/sync_file_system_api_he
lpers.h" | 16 #include "chrome/browser/extensions/api/sync_file_system/sync_file_system_api_he
lpers.h" |
| 17 #include "chrome/browser/extensions/extension_prefs.h" | 17 #include "chrome/browser/extensions/extension_prefs.h" |
| 18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/sync/profile_sync_service.h" | 19 #include "chrome/browser/sync/profile_sync_service.h" |
| 20 #include "chrome/browser/sync/profile_sync_service_factory.h" | 20 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 21 #include "chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_servi
ce.h" | 21 #include "chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_servi
ce.h" |
| 22 #include "chrome/browser/sync_file_system/local/local_file_sync_service.h" | 22 #include "chrome/browser/sync_file_system/local/local_file_sync_service.h" |
| 23 #include "chrome/browser/sync_file_system/logger.h" | 23 #include "chrome/browser/sync_file_system/logger.h" |
| 24 #include "chrome/browser/sync_file_system/sync_direction.h" | 24 #include "chrome/browser/sync_file_system/sync_direction.h" |
| 25 #include "chrome/browser/sync_file_system/sync_event_observer.h" | 25 #include "chrome/browser/sync_file_system/sync_event_observer.h" |
| 26 #include "chrome/browser/sync_file_system/sync_file_metadata.h" | 26 #include "chrome/browser/sync_file_system/sync_file_metadata.h" |
| 27 #include "chrome/browser/sync_file_system/sync_status_code.h" | 27 #include "chrome/browser/sync_file_system/sync_status_code.h" |
| 28 #include "chrome/browser/sync_file_system/syncable_file_system_util.h" | 28 #include "chrome/browser/sync_file_system/syncable_file_system_util.h" |
| 29 #include "chrome/common/extensions/extension.h" | |
| 30 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" | 29 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" |
| 31 #include "content/public/browser/browser_thread.h" | 30 #include "content/public/browser/browser_thread.h" |
| 32 #include "content/public/browser/notification_details.h" | 31 #include "content/public/browser/notification_details.h" |
| 33 #include "content/public/browser/notification_service.h" | 32 #include "content/public/browser/notification_service.h" |
| 34 #include "content/public/browser/storage_partition.h" | 33 #include "content/public/browser/storage_partition.h" |
| 34 #include "extensions/common/extension.h" |
| 35 #include "extensions/common/manifest_constants.h" | 35 #include "extensions/common/manifest_constants.h" |
| 36 #include "url/gurl.h" | 36 #include "url/gurl.h" |
| 37 #include "webkit/browser/fileapi/file_system_context.h" | 37 #include "webkit/browser/fileapi/file_system_context.h" |
| 38 | 38 |
| 39 using content::BrowserThread; | 39 using content::BrowserThread; |
| 40 using extensions::Extension; | 40 using extensions::Extension; |
| 41 using extensions::ExtensionPrefs; | 41 using extensions::ExtensionPrefs; |
| 42 using fileapi::FileSystemURL; | 42 using fileapi::FileSystemURL; |
| 43 using fileapi::FileSystemURLSet; | 43 using fileapi::FileSystemURLSet; |
| 44 | 44 |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 sync_enabled_ = profile_sync_service->GetActiveDataTypes().Has( | 749 sync_enabled_ = profile_sync_service->GetActiveDataTypes().Has( |
| 750 syncer::APPS); | 750 syncer::APPS); |
| 751 remote_file_service_->SetSyncEnabled(sync_enabled_); | 751 remote_file_service_->SetSyncEnabled(sync_enabled_); |
| 752 if (!old_sync_enabled && sync_enabled_) { | 752 if (!old_sync_enabled && sync_enabled_) { |
| 753 local_sync_->Schedule(); | 753 local_sync_->Schedule(); |
| 754 remote_sync_->Schedule(); | 754 remote_sync_->Schedule(); |
| 755 } | 755 } |
| 756 } | 756 } |
| 757 | 757 |
| 758 } // namespace sync_file_system | 758 } // namespace sync_file_system |
| OLD | NEW |