| 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/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
| 13 #include "chrome/browser/extensions/api/sync_file_system/extension_sync_event_ob
server.h" | 13 #include "chrome/browser/extensions/api/sync_file_system/extension_sync_event_ob
server.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/browser/sync/profile_sync_service.h" | 15 #include "chrome/browser/sync/profile_sync_service.h" |
| 16 #include "chrome/browser/sync/profile_sync_service_factory.h" | 16 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 17 #include "chrome/browser/sync_file_system/drive_file_sync_service.h" | 17 #include "chrome/browser/sync_file_system/drive_file_sync_service.h" |
| 18 #include "chrome/browser/sync_file_system/local_file_sync_service.h" | 18 #include "chrome/browser/sync_file_system/local_file_sync_service.h" |
| 19 #include "chrome/browser/sync_file_system/sync_event_observer.h" | 19 #include "chrome/browser/sync_file_system/sync_event_observer.h" |
| 20 #include "chrome/common/chrome_notification_types.h" | 20 #include "chrome/common/chrome_notification_types.h" |
| 21 #include "chrome/common/extensions/extension.h" | 21 #include "chrome/common/extensions/extension.h" |
| 22 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" | 22 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" |
| 23 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" |
| 24 #include "content/public/browser/notification_details.h" | 24 #include "content/public/browser/notification_details.h" |
| 25 #include "content/public/browser/notification_service.h" | 25 #include "content/public/browser/notification_service.h" |
| 26 #include "googleurl/src/gurl.h" | 26 #include "googleurl/src/gurl.h" |
| 27 #include "webkit/fileapi/file_system_context.h" | 27 #include "webkit/browser/fileapi/file_system_context.h" |
| 28 #include "webkit/fileapi/syncable/sync_direction.h" | 28 #include "webkit/fileapi/syncable/sync_direction.h" |
| 29 #include "webkit/fileapi/syncable/sync_file_metadata.h" | 29 #include "webkit/fileapi/syncable/sync_file_metadata.h" |
| 30 #include "webkit/fileapi/syncable/sync_status_code.h" | 30 #include "webkit/fileapi/syncable/sync_status_code.h" |
| 31 | 31 |
| 32 using content::BrowserThread; | 32 using content::BrowserThread; |
| 33 using fileapi::FileSystemURL; | 33 using fileapi::FileSystemURL; |
| 34 using fileapi::FileSystemURLSet; | 34 using fileapi::FileSystemURLSet; |
| 35 | 35 |
| 36 namespace sync_file_system { | 36 namespace sync_file_system { |
| 37 | 37 |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 syncer::APPS); | 560 syncer::APPS); |
| 561 remote_file_service_->SetSyncEnabled(sync_enabled_); | 561 remote_file_service_->SetSyncEnabled(sync_enabled_); |
| 562 if (sync_enabled_) { | 562 if (sync_enabled_) { |
| 563 base::MessageLoopProxy::current()->PostTask( | 563 base::MessageLoopProxy::current()->PostTask( |
| 564 FROM_HERE, base::Bind(&SyncFileSystemService::MaybeStartSync, | 564 FROM_HERE, base::Bind(&SyncFileSystemService::MaybeStartSync, |
| 565 AsWeakPtr())); | 565 AsWeakPtr())); |
| 566 } | 566 } |
| 567 } | 567 } |
| 568 | 568 |
| 569 } // namespace sync_file_system | 569 } // namespace sync_file_system |
| OLD | NEW |