OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extension.h" | 5 #include "chrome/common/extensions/extension.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 2953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2964 origin_only_pattern.SetHost(origin.host()); | 2964 origin_only_pattern.SetHost(origin.host()); |
2965 origin_only_pattern.SetPath("/*"); | 2965 origin_only_pattern.SetPath("/*"); |
2966 | 2966 |
2967 URLPatternSet origin_only_pattern_list; | 2967 URLPatternSet origin_only_pattern_list; |
2968 origin_only_pattern_list.AddPattern(origin_only_pattern); | 2968 origin_only_pattern_list.AddPattern(origin_only_pattern); |
2969 | 2969 |
2970 return web_extent().OverlapsWith(origin_only_pattern_list); | 2970 return web_extent().OverlapsWith(origin_only_pattern_list); |
2971 } | 2971 } |
2972 | 2972 |
2973 Extension::SyncType Extension::GetSyncType() const { | 2973 Extension::SyncType Extension::GetSyncType() const { |
2974 // The CWS needs to be treated as syncable app because it appears on the NTP | |
2975 // and we need to make sure its position values are synced. | |
2976 // If another case arises where we need to have a special case like the CWS, | |
2977 // something more systematically should be done. | |
Finnur
2012/02/07 10:12:53
s/systematically/systematic.
csharp
2012/02/07 15:49:41
Done.
| |
2978 if (id() == extension_misc::kWebStoreAppId) | |
2979 return SYNC_TYPE_APP; | |
2980 | |
2974 // TODO(akalin): Figure out if we need to allow some other types. | 2981 // TODO(akalin): Figure out if we need to allow some other types. |
2975 if (location() != Extension::INTERNAL) { | 2982 if (location() != Extension::INTERNAL) { |
2976 // We have a non-standard location. | 2983 // We have a non-standard location. |
2977 return SYNC_TYPE_NONE; | 2984 return SYNC_TYPE_NONE; |
2978 } | 2985 } |
2979 | 2986 |
2980 // Disallow extensions with non-gallery auto-update URLs for now. | 2987 // Disallow extensions with non-gallery auto-update URLs for now. |
2981 // | 2988 // |
2982 // TODO(akalin): Relax this restriction once we've put in UI to | 2989 // TODO(akalin): Relax this restriction once we've put in UI to |
2983 // approve synced extensions. | 2990 // approve synced extensions. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3047 already_disabled(false), | 3054 already_disabled(false), |
3048 extension(extension) {} | 3055 extension(extension) {} |
3049 | 3056 |
3050 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 3057 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
3051 const Extension* extension, | 3058 const Extension* extension, |
3052 const ExtensionPermissionSet* permissions, | 3059 const ExtensionPermissionSet* permissions, |
3053 Reason reason) | 3060 Reason reason) |
3054 : reason(reason), | 3061 : reason(reason), |
3055 extension(extension), | 3062 extension(extension), |
3056 permissions(permissions) {} | 3063 permissions(permissions) {} |
OLD | NEW |