Chromium Code Reviews| 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 3641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 should appear on |
| 3663 // their positions should sync. | 3663 // multiple machines, and the chrome web store. |
|
Finnur
2012/04/12 15:01:40
nit: 'and should appear on multiple machines' is e
csharp
2012/04/12 15:06:29
Done.
| |
| 3664 return location() == Extension::INTERNAL || | 3664 return location() == Extension::INTERNAL || |
| 3665 ShouldDisplayInLauncher(); | 3665 id() == extension_misc::kWebStoreAppId; |
| 3666 } | 3666 } |
| 3667 | 3667 |
| 3668 bool Extension::ShouldDisplayInLauncher() const { | 3668 bool Extension::ShouldDisplayInLauncher() const { |
| 3669 // All apps should be displayed on the NTP except for the Cloud Print App. | 3669 // All apps should be displayed on the NTP except for the Cloud Print App. |
| 3670 return is_app() && id() != extension_misc::kCloudPrintAppId; | 3670 return is_app() && id() != extension_misc::kCloudPrintAppId; |
| 3671 } | 3671 } |
| 3672 | 3672 |
| 3673 ExtensionInfo::ExtensionInfo(const DictionaryValue* manifest, | 3673 ExtensionInfo::ExtensionInfo(const DictionaryValue* manifest, |
| 3674 const std::string& id, | 3674 const std::string& id, |
| 3675 const FilePath& path, | 3675 const FilePath& path, |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 3705 already_disabled(false), | 3705 already_disabled(false), |
| 3706 extension(extension) {} | 3706 extension(extension) {} |
| 3707 | 3707 |
| 3708 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 3708 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
| 3709 const Extension* extension, | 3709 const Extension* extension, |
| 3710 const ExtensionPermissionSet* permissions, | 3710 const ExtensionPermissionSet* permissions, |
| 3711 Reason reason) | 3711 Reason reason) |
| 3712 : reason(reason), | 3712 : reason(reason), |
| 3713 extension(extension), | 3713 extension(extension), |
| 3714 permissions(permissions) {} | 3714 permissions(permissions) {} |
| OLD | NEW |