OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/glue/extension_util.h" | 5 #include "chrome/browser/sync/glue/extension_util.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 if (extension.is_theme()) { | 21 if (extension.is_theme()) { |
22 return false; | 22 return false; |
23 } | 23 } |
24 | 24 |
25 // TODO(akalin): Add Extensions::is_app(). | 25 // TODO(akalin): Add Extensions::is_app(). |
26 if (!extension.GetFullLaunchURL().is_empty()) { | 26 if (!extension.GetFullLaunchURL().is_empty()) { |
27 // We have an app. | 27 // We have an app. |
28 return false; | 28 return false; |
29 } | 29 } |
30 | 30 |
| 31 // Reject converted user scripts that don't have an auto-update URL. |
| 32 if (extension.converted_from_user_script() && |
| 33 extension.update_url().is_empty()) { |
| 34 return false; |
| 35 } |
| 36 |
31 // TODO(akalin): Figure out if we need to allow some other types. | 37 // TODO(akalin): Figure out if we need to allow some other types. |
32 if (extension.location() != Extension::INTERNAL) { | 38 if (extension.location() != Extension::INTERNAL) { |
33 // We have a non-standard location. | 39 // We have a non-standard location. |
34 return false; | 40 return false; |
35 } | 41 } |
36 | 42 |
37 // Disallow extensions with non-gallery auto-update URLs for now. | 43 // Disallow extensions with non-gallery auto-update URLs for now. |
38 // | 44 // |
39 // TODO(akalin): Relax this restriction once we've put in UI to | 45 // TODO(akalin): Relax this restriction once we've put in UI to |
40 // approve synced extensions. | 46 // approve synced extensions. |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 // |specifics| has a more recent or the same version, so merge it | 248 // |specifics| has a more recent or the same version, so merge it |
243 // in. | 249 // in. |
244 CopyNonUserProperties(specifics, merged_specifics); | 250 CopyNonUserProperties(specifics, merged_specifics); |
245 if (merge_user_properties) { | 251 if (merge_user_properties) { |
246 CopyUserProperties(specifics, merged_specifics); | 252 CopyUserProperties(specifics, merged_specifics); |
247 } | 253 } |
248 } | 254 } |
249 } | 255 } |
250 | 256 |
251 } // namespace browser_sync | 257 } // namespace browser_sync |
OLD | NEW |