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

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

Issue 10066014: Modify IsSyncable to only include Internal items and the Chrome Web Store (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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
« no previous file with comments | « no previous file | chrome/common/extensions/extension_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3641 matching lines...) Expand 10 before | Expand all | Expand 10 after
3652 return SYNC_TYPE_APP; 3652 return SYNC_TYPE_APP;
3653 3653
3654 default: 3654 default:
3655 return SYNC_TYPE_NONE; 3655 return SYNC_TYPE_NONE;
3656 } 3656 }
3657 } 3657 }
3658 3658
3659 bool Extension::IsSyncable() const { 3659 bool Extension::IsSyncable() const {
3660 // TODO(akalin): Figure out if we need to allow some other types. 3660 // TODO(akalin): Figure out if we need to allow some other types.
3661 3661
3662 // We want to sync any extensions that are shown in the launcher because 3662 // We want to sync any extensions that are internal and the chrome web store.
3663 // their positions should sync.
3664 return location() == Extension::INTERNAL || 3663 return location() == Extension::INTERNAL ||
3665 ShouldDisplayInLauncher(); 3664 id() == extension_misc::kWebStoreAppId;
3666 } 3665 }
3667 3666
3668 bool Extension::ShouldDisplayInLauncher() const { 3667 bool Extension::ShouldDisplayInLauncher() const {
3669 // All apps should be displayed on the NTP except for the Cloud Print App. 3668 // All apps should be displayed on the NTP except for the Cloud Print App.
3670 return is_app() && id() != extension_misc::kCloudPrintAppId; 3669 return is_app() && id() != extension_misc::kCloudPrintAppId;
3671 } 3670 }
3672 3671
3673 ExtensionInfo::ExtensionInfo(const DictionaryValue* manifest, 3672 ExtensionInfo::ExtensionInfo(const DictionaryValue* manifest,
3674 const std::string& id, 3673 const std::string& id,
3675 const FilePath& path, 3674 const FilePath& path,
(...skipping 29 matching lines...) Expand all
3705 already_disabled(false), 3704 already_disabled(false),
3706 extension(extension) {} 3705 extension(extension) {}
3707 3706
3708 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( 3707 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo(
3709 const Extension* extension, 3708 const Extension* extension,
3710 const ExtensionPermissionSet* permissions, 3709 const ExtensionPermissionSet* permissions,
3711 Reason reason) 3710 Reason reason)
3712 : reason(reason), 3711 : reason(reason),
3713 extension(extension), 3712 extension(extension),
3714 permissions(permissions) {} 3713 permissions(permissions) {}
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/extension_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698