| 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/extensions/extension_sync_service.h" | 5 #include "chrome/browser/extensions/extension_sync_service.h" |
| 6 | 6 |
| 7 #include <iterator> | 7 #include <iterator> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
| 11 #include "base/threading/thread_restrictions.h" | 11 #include "base/threading/thread_restrictions.h" |
| 12 #include "chrome/browser/extensions/app_sync_data.h" | 12 #include "chrome/browser/extensions/app_sync_data.h" |
| 13 #include "chrome/browser/extensions/extension_error_ui.h" | 13 #include "chrome/browser/extensions/extension_error_ui.h" |
| 14 #include "chrome/browser/extensions/extension_prefs.h" | 14 #include "chrome/browser/extensions/extension_prefs.h" |
| 15 #include "chrome/browser/extensions/extension_service.h" | 15 #include "chrome/browser/extensions/extension_service.h" |
| 16 #include "chrome/browser/extensions/extension_sorting.h" | 16 #include "chrome/browser/extensions/extension_sorting.h" |
| 17 #include "chrome/browser/extensions/extension_sync_data.h" | 17 #include "chrome/browser/extensions/extension_sync_data.h" |
| 18 #include "chrome/browser/extensions/extension_sync_service_factory.h" | 18 #include "chrome/browser/extensions/extension_sync_service_factory.h" |
| 19 #include "chrome/browser/extensions/extension_util.h" | 19 #include "chrome/browser/extensions/extension_util.h" |
| 20 #include "chrome/browser/profiles/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
| 21 #include "chrome/browser/sync/glue/sync_start_util.h" | 21 #include "chrome/browser/sync/glue/sync_start_util.h" |
| 22 #include "chrome/browser/sync/sync_prefs.h" | 22 #include "chrome/browser/sync/sync_prefs.h" |
| 23 #include "chrome/common/extensions/extension.h" | |
| 24 #include "chrome/common/extensions/sync_helper.h" | 23 #include "chrome/common/extensions/sync_helper.h" |
| 25 #include "content/public/browser/browser_thread.h" | 24 #include "content/public/browser/browser_thread.h" |
| 25 #include "extensions/common/extension.h" |
| 26 #include "extensions/common/feature_switch.h" | 26 #include "extensions/common/feature_switch.h" |
| 27 #include "extensions/common/manifest_constants.h" | 27 #include "extensions/common/manifest_constants.h" |
| 28 #include "sync/api/sync_change.h" | 28 #include "sync/api/sync_change.h" |
| 29 #include "sync/api/sync_error_factory.h" | 29 #include "sync/api/sync_error_factory.h" |
| 30 | 30 |
| 31 using extensions::Extension; | 31 using extensions::Extension; |
| 32 using extensions::ExtensionPrefs; | 32 using extensions::ExtensionPrefs; |
| 33 using extensions::FeatureSwitch; | 33 using extensions::FeatureSwitch; |
| 34 | 34 |
| 35 ExtensionSyncService::ExtensionSyncService(Profile* profile, | 35 ExtensionSyncService::ExtensionSyncService(Profile* profile, |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 app_sync_bundle_.SyncChangeIfNeeded(extension); | 443 app_sync_bundle_.SyncChangeIfNeeded(extension); |
| 444 else if (extension_service_->is_ready() && !flare_.is_null()) | 444 else if (extension_service_->is_ready() && !flare_.is_null()) |
| 445 flare_.Run(syncer::APPS); | 445 flare_.Run(syncer::APPS); |
| 446 } else if (extensions::sync_helper::IsSyncableExtension(&extension)) { | 446 } else if (extensions::sync_helper::IsSyncableExtension(&extension)) { |
| 447 if (extension_sync_bundle_.IsSyncing()) | 447 if (extension_sync_bundle_.IsSyncing()) |
| 448 extension_sync_bundle_.SyncChangeIfNeeded(extension); | 448 extension_sync_bundle_.SyncChangeIfNeeded(extension); |
| 449 else if (extension_service_->is_ready() && !flare_.is_null()) | 449 else if (extension_service_->is_ready() && !flare_.is_null()) |
| 450 flare_.Run(syncer::EXTENSIONS); | 450 flare_.Run(syncer::EXTENSIONS); |
| 451 } | 451 } |
| 452 } | 452 } |
| OLD | NEW |