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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "chrome/browser/extensions/bookmark_app_helper.h" | 11 #include "chrome/browser/extensions/bookmark_app_helper.h" |
12 #include "chrome/browser/extensions/extension_service.h" | 12 #include "chrome/browser/extensions/extension_service.h" |
13 #include "chrome/browser/extensions/extension_sync_data.h" | 13 #include "chrome/browser/extensions/extension_sync_data.h" |
14 #include "chrome/browser/extensions/extension_sync_service_factory.h" | 14 #include "chrome/browser/extensions/extension_sync_service_factory.h" |
15 #include "chrome/browser/extensions/extension_util.h" | 15 #include "chrome/browser/extensions/extension_util.h" |
16 #include "chrome/browser/extensions/launch_util.h" | 16 #include "chrome/browser/extensions/launch_util.h" |
17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/browser/sync/glue/sync_start_util.h" | 18 #include "chrome/browser/sync/glue/sync_start_util.h" |
19 #include "chrome/common/extensions/extension_constants.h" | 19 #include "chrome/common/extensions/extension_constants.h" |
20 #include "chrome/common/extensions/sync_helper.h" | 20 #include "chrome/common/extensions/sync_helper.h" |
21 #include "chrome/common/web_application_info.h" | 21 #include "chrome/common/web_application_info.h" |
| 22 #include "components/sync/api/sync_change.h" |
| 23 #include "components/sync/api/sync_error_factory.h" |
22 #include "extensions/browser/app_sorting.h" | 24 #include "extensions/browser/app_sorting.h" |
23 #include "extensions/browser/extension_prefs.h" | 25 #include "extensions/browser/extension_prefs.h" |
24 #include "extensions/browser/extension_registry.h" | 26 #include "extensions/browser/extension_registry.h" |
25 #include "extensions/browser/extension_system.h" | 27 #include "extensions/browser/extension_system.h" |
26 #include "extensions/browser/extension_util.h" | 28 #include "extensions/browser/extension_util.h" |
27 #include "extensions/browser/uninstall_reason.h" | 29 #include "extensions/browser/uninstall_reason.h" |
28 #include "extensions/common/extension.h" | 30 #include "extensions/common/extension.h" |
29 #include "extensions/common/extension_set.h" | 31 #include "extensions/common/extension_set.h" |
30 #include "extensions/common/image_util.h" | 32 #include "extensions/common/image_util.h" |
31 #include "extensions/common/permissions/permission_message_provider.h" | 33 #include "extensions/common/permissions/permission_message_provider.h" |
32 #include "extensions/common/permissions/permissions_data.h" | 34 #include "extensions/common/permissions/permissions_data.h" |
33 #include "sync/api/sync_change.h" | |
34 #include "sync/api/sync_error_factory.h" | |
35 | 35 |
36 #if defined(ENABLE_SUPERVISED_USERS) | 36 #if defined(ENABLE_SUPERVISED_USERS) |
37 #include "chrome/browser/supervised_user/supervised_user_service.h" | 37 #include "chrome/browser/supervised_user/supervised_user_service.h" |
38 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" | 38 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" |
39 #endif | 39 #endif |
40 | 40 |
41 using extensions::AppSorting; | 41 using extensions::AppSorting; |
42 using extensions::Extension; | 42 using extensions::Extension; |
43 using extensions::ExtensionPrefs; | 43 using extensions::ExtensionPrefs; |
44 using extensions::ExtensionRegistry; | 44 using extensions::ExtensionRegistry; |
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 sync_data_list->push_back(CreateSyncData(*extension)); | 710 sync_data_list->push_back(CreateSyncData(*extension)); |
711 } | 711 } |
712 } | 712 } |
713 } | 713 } |
714 | 714 |
715 bool ExtensionSyncService::ShouldSync(const Extension& extension) const { | 715 bool ExtensionSyncService::ShouldSync(const Extension& extension) const { |
716 // Themes are handled by the ThemeSyncableService. | 716 // Themes are handled by the ThemeSyncableService. |
717 return extensions::util::ShouldSync(&extension, profile_) && | 717 return extensions::util::ShouldSync(&extension, profile_) && |
718 !extension.is_theme(); | 718 !extension.is_theme(); |
719 } | 719 } |
OLD | NEW |