Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Side by Side Diff: chrome/common/extensions/extension.cc

Issue 9340007: Make the Chrome Web Store Icon Syncable (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Responding to Comments Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 systematic should be done.
2978 if (id() == extension_misc::kWebStoreAppId)
Aaron Boodman 2012/02/08 00:37:53 Perhaps a better test would be: return extension-
csharp 2012/02/08 15:46:16 I'm fairly certain that all loaded apps will appea
csharp 2012/02/08 16:43:33 Ok, so not all loaded apps appear in the app launc
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
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) {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698