| 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 3498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3509 return SYNC_TYPE_APP; | 3509 return SYNC_TYPE_APP; |
| 3510 | 3510 |
| 3511 default: | 3511 default: |
| 3512 return SYNC_TYPE_NONE; | 3512 return SYNC_TYPE_NONE; |
| 3513 } | 3513 } |
| 3514 } | 3514 } |
| 3515 | 3515 |
| 3516 bool Extension::IsSyncable() const { | 3516 bool Extension::IsSyncable() const { |
| 3517 // TODO(akalin): Figure out if we need to allow some other types. | 3517 // TODO(akalin): Figure out if we need to allow some other types. |
| 3518 | 3518 |
| 3519 // We want to sync any extensions that are shown in the launcher because | 3519 // We want to sync any extensions that are internal and the chrome web store. |
| 3520 // their positions should sync. | |
| 3521 return location() == Extension::INTERNAL || | 3520 return location() == Extension::INTERNAL || |
| 3522 ShouldDisplayInLauncher(); | 3521 id() == extension_misc::kWebStoreAppId; |
| 3523 } | 3522 } |
| 3524 | 3523 |
| 3525 bool Extension::ShouldDisplayInLauncher() const { | 3524 bool Extension::ShouldDisplayInLauncher() const { |
| 3526 // All apps should be displayed on the NTP except for the Cloud Print App. | 3525 // All apps should be displayed on the NTP except for the Cloud Print App. |
| 3527 return is_app() && id() != extension_misc::kCloudPrintAppId; | 3526 return is_app() && id() != extension_misc::kCloudPrintAppId; |
| 3528 } | 3527 } |
| 3529 | 3528 |
| 3530 ExtensionInfo::ExtensionInfo(const DictionaryValue* manifest, | 3529 ExtensionInfo::ExtensionInfo(const DictionaryValue* manifest, |
| 3531 const std::string& id, | 3530 const std::string& id, |
| 3532 const FilePath& path, | 3531 const FilePath& path, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 3562 already_disabled(false), | 3561 already_disabled(false), |
| 3563 extension(extension) {} | 3562 extension(extension) {} |
| 3564 | 3563 |
| 3565 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 3564 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
| 3566 const Extension* extension, | 3565 const Extension* extension, |
| 3567 const ExtensionPermissionSet* permissions, | 3566 const ExtensionPermissionSet* permissions, |
| 3568 Reason reason) | 3567 Reason reason) |
| 3569 : reason(reason), | 3568 : reason(reason), |
| 3570 extension(extension), | 3569 extension(extension), |
| 3571 permissions(permissions) {} | 3570 permissions(permissions) {} |
| OLD | NEW |