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 <ostream> | 7 #include <ostream> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 3758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3769 return SYNC_TYPE_APP; | 3769 return SYNC_TYPE_APP; |
3770 | 3770 |
3771 default: | 3771 default: |
3772 return SYNC_TYPE_NONE; | 3772 return SYNC_TYPE_NONE; |
3773 } | 3773 } |
3774 } | 3774 } |
3775 | 3775 |
3776 bool Extension::IsSyncable() const { | 3776 bool Extension::IsSyncable() const { |
3777 // TODO(akalin): Figure out if we need to allow some other types. | 3777 // TODO(akalin): Figure out if we need to allow some other types. |
3778 | 3778 |
3779 // We want to sync any extensions that are internal and the chrome web store. | 3779 // Sync internal externsions except default apps. |
Mihai Parparita -not on Chrome
2012/08/24 21:05:23
Extra space before internal, and there's a typo in
| |
3780 return location() == Extension::INTERNAL || | 3780 bool is_syncable = (location() == Extension::INTERNAL && !from_default()); |
3781 id() == extension_misc::kWebStoreAppId; | 3781 // sync the chrome web store. |
Mihai Parparita -not on Chrome
2012/08/24 21:05:23
Another redundant comment. Based on http://crrev.c
| |
3782 is_syncable |= (id() == extension_misc::kWebStoreAppId); | |
3783 return is_syncable; | |
3782 } | 3784 } |
3783 | 3785 |
3784 bool Extension::ShouldDisplayInLauncher() const { | 3786 bool Extension::ShouldDisplayInLauncher() const { |
3785 // All apps should be displayed on the NTP except for the Cloud Print App. | 3787 // All apps should be displayed on the NTP except for the Cloud Print App. |
3786 return is_app() && id() != extension_misc::kCloudPrintAppId; | 3788 return is_app() && id() != extension_misc::kCloudPrintAppId; |
3787 } | 3789 } |
3788 | 3790 |
3789 bool Extension::InstallWarning::operator==(const InstallWarning& other) const { | 3791 bool Extension::InstallWarning::operator==(const InstallWarning& other) const { |
3790 return format == other.format && message == other.message; | 3792 return format == other.format && message == other.message; |
3791 } | 3793 } |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3943 | 3945 |
3944 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 3946 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
3945 const Extension* extension, | 3947 const Extension* extension, |
3946 const PermissionSet* permissions, | 3948 const PermissionSet* permissions, |
3947 Reason reason) | 3949 Reason reason) |
3948 : reason(reason), | 3950 : reason(reason), |
3949 extension(extension), | 3951 extension(extension), |
3950 permissions(permissions) {} | 3952 permissions(permissions) {} |
3951 | 3953 |
3952 } // namespace extensions | 3954 } // namespace extensions |
OLD | NEW |