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

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

Issue 9315007: Make the Chrome Web Store Icon Syncable (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Adding DCHECK instead of NOTREACHED 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 synable app.
akalin 2012/02/02 01:17:46 synable -> syncable also comment as to why
csharp 2012/02/02 15:26:18 Done.
2975 if (id() == extension_misc::kWebStoreAppId)
2976 return SYNC_TYPE_APP;
2977
2974 // TODO(akalin): Figure out if we need to allow some other types. 2978 // TODO(akalin): Figure out if we need to allow some other types.
2975 if (location() != Extension::INTERNAL) { 2979 if (location() != Extension::INTERNAL) {
2976 // We have a non-standard location. 2980 // We have a non-standard location.
2977 return SYNC_TYPE_NONE; 2981 return SYNC_TYPE_NONE;
2978 } 2982 }
2979 2983
2980 // Disallow extensions with non-gallery auto-update URLs for now. 2984 // Disallow extensions with non-gallery auto-update URLs for now.
2981 // 2985 //
2982 // TODO(akalin): Relax this restriction once we've put in UI to 2986 // TODO(akalin): Relax this restriction once we've put in UI to
2983 // approve synced extensions. 2987 // approve synced extensions.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
3047 already_disabled(false), 3051 already_disabled(false),
3048 extension(extension) {} 3052 extension(extension) {}
3049 3053
3050 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( 3054 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo(
3051 const Extension* extension, 3055 const Extension* extension,
3052 const ExtensionPermissionSet* permissions, 3056 const ExtensionPermissionSet* permissions,
3053 Reason reason) 3057 Reason reason)
3054 : reason(reason), 3058 : reason(reason),
3055 extension(extension), 3059 extension(extension),
3056 permissions(permissions) {} 3060 permissions(permissions) {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698