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/common/extensions/sync_helper.h" | 5 #include "chrome/common/extensions/sync_helper.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/common/extensions/api/plugins/plugins_handler.h" | 8 #include "chrome/common/extensions/api/plugins/plugins_handler.h" |
9 #include "chrome/common/extensions/extension_constants.h" | 9 #include "chrome/common/extensions/extension_constants.h" |
10 #include "chrome/common/extensions/manifest_url_handler.h" | 10 #include "chrome/common/extensions/manifest_url_handler.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 case Manifest::TYPE_LEGACY_PACKAGED_APP: | 60 case Manifest::TYPE_LEGACY_PACKAGED_APP: |
61 case Manifest::TYPE_PLATFORM_APP: | 61 case Manifest::TYPE_PLATFORM_APP: |
62 return SYNC_TYPE_APP; | 62 return SYNC_TYPE_APP; |
63 | 63 |
64 case Manifest::TYPE_UNKNOWN: | 64 case Manifest::TYPE_UNKNOWN: |
65 // Confusingly, themes are actually synced. | 65 // Confusingly, themes are actually synced. |
66 // TODO(yoz): Make this look less inconsistent. | 66 // TODO(yoz): Make this look less inconsistent. |
67 case Manifest::TYPE_THEME: | 67 case Manifest::TYPE_THEME: |
68 case Manifest::TYPE_SHARED_MODULE: | 68 case Manifest::TYPE_SHARED_MODULE: |
69 return SYNC_TYPE_NONE; | 69 return SYNC_TYPE_NONE; |
| 70 |
| 71 case Manifest::NUM_LOAD_TYPES: |
| 72 NOTREACHED(); |
70 } | 73 } |
71 NOTREACHED(); | 74 NOTREACHED(); |
72 return SYNC_TYPE_NONE; | 75 return SYNC_TYPE_NONE; |
73 } | 76 } |
74 | 77 |
75 } // namespace | 78 } // namespace |
76 | 79 |
77 bool IsSyncable(const Extension* extension) { | 80 bool IsSyncable(const Extension* extension) { |
78 // TODO(akalin): Figure out if we need to allow some other types. | 81 // TODO(akalin): Figure out if we need to allow some other types. |
79 | 82 |
(...skipping 14 matching lines...) Expand all Loading... |
94 bool IsSyncableExtension(const Extension* extension) { | 97 bool IsSyncableExtension(const Extension* extension) { |
95 return GetSyncType(extension) == SYNC_TYPE_EXTENSION; | 98 return GetSyncType(extension) == SYNC_TYPE_EXTENSION; |
96 } | 99 } |
97 | 100 |
98 bool IsSyncableApp(const Extension* extension) { | 101 bool IsSyncableApp(const Extension* extension) { |
99 return GetSyncType(extension) == SYNC_TYPE_APP; | 102 return GetSyncType(extension) == SYNC_TYPE_APP; |
100 } | 103 } |
101 | 104 |
102 } // namespace sync_helper | 105 } // namespace sync_helper |
103 } // namespace extensions | 106 } // namespace extensions |
OLD | NEW |