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/extension_constants.h" | 8 #include "chrome/common/extensions/extension_constants.h" |
9 #include "extensions/common/constants.h" | 9 #include "extensions/common/constants.h" |
10 #include "extensions/common/extension.h" | 10 #include "extensions/common/extension.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 case Manifest::TYPE_USER_SCRIPT: | 65 case Manifest::TYPE_USER_SCRIPT: |
66 // We only want to sync user scripts with gallery update URLs. | 66 // We only want to sync user scripts with gallery update URLs. |
67 if (ManifestURL::UpdatesFromGallery(extension)) | 67 if (ManifestURL::UpdatesFromGallery(extension)) |
68 return true; | 68 return true; |
69 return false; | 69 return false; |
70 | 70 |
71 case Manifest::TYPE_UNKNOWN: | 71 case Manifest::TYPE_UNKNOWN: |
72 case Manifest::TYPE_SHARED_MODULE: | 72 case Manifest::TYPE_SHARED_MODULE: |
73 return false; | 73 return false; |
74 | |
75 case Manifest::NUM_LOAD_TYPES: | |
76 NOTREACHED(); | |
77 } | 74 } |
78 NOTREACHED(); | 75 NOTREACHED(); |
79 return false; | 76 return false; |
80 } | 77 } |
81 | 78 |
82 bool IsSyncableComponentExtension(const Extension* extension) { | 79 bool IsSyncableComponentExtension(const Extension* extension) { |
83 if (!Manifest::IsComponentLocation(extension->location())) | 80 if (!Manifest::IsComponentLocation(extension->location())) |
84 return false; | 81 return false; |
85 return (extension->id() == extensions::kWebStoreAppId) || | 82 return (extension->id() == extensions::kWebStoreAppId) || |
86 (extension->id() == extension_misc::kChromeAppId); | 83 (extension->id() == extension_misc::kChromeAppId); |
87 } | 84 } |
88 | 85 |
89 } // namespace sync_helper | 86 } // namespace sync_helper |
90 } // namespace extensions | 87 } // namespace extensions |
OLD | NEW |