| 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 1829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1840 if (!intent_service.GetString(keys::kIntentHref, &href)) { | 1840 if (!intent_service.GetString(keys::kIntentHref, &href)) { |
| 1841 *error = ASCIIToUTF16(errors::kInvalidIntentHref); | 1841 *error = ASCIIToUTF16(errors::kInvalidIntentHref); |
| 1842 return false; | 1842 return false; |
| 1843 } | 1843 } |
| 1844 } | 1844 } |
| 1845 | 1845 |
| 1846 // For packaged/hosted apps, empty href implies the respective launch URLs. | 1846 // For packaged/hosted apps, empty href implies the respective launch URLs. |
| 1847 if (href.empty()) { | 1847 if (href.empty()) { |
| 1848 if (is_hosted_app()) { | 1848 if (is_hosted_app()) { |
| 1849 href = launch_web_url(); | 1849 href = launch_web_url(); |
| 1850 } else if (is_packaged_app()) { | 1850 } else if (is_packaged_app() || is_platform_app()) { |
| 1851 href = launch_local_path(); | 1851 href = launch_local_path(); |
| 1852 } | 1852 } |
| 1853 } | 1853 } |
| 1854 | 1854 |
| 1855 // If we still don't have an href, the manifest is malformed. | 1855 // If we still don't have an href, the manifest is malformed. |
| 1856 if (href.empty()) { | 1856 if (href.empty()) { |
| 1857 *error = ExtensionErrorUtils::FormatErrorMessageUTF16( | 1857 *error = ExtensionErrorUtils::FormatErrorMessageUTF16( |
| 1858 errors::kInvalidIntentHrefEmpty, action_name); | 1858 errors::kInvalidIntentHrefEmpty, action_name); |
| 1859 return false; | 1859 return false; |
| 1860 } | 1860 } |
| (...skipping 1637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3498 already_disabled(false), | 3498 already_disabled(false), |
| 3499 extension(extension) {} | 3499 extension(extension) {} |
| 3500 | 3500 |
| 3501 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 3501 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
| 3502 const Extension* extension, | 3502 const Extension* extension, |
| 3503 const ExtensionPermissionSet* permissions, | 3503 const ExtensionPermissionSet* permissions, |
| 3504 Reason reason) | 3504 Reason reason) |
| 3505 : reason(reason), | 3505 : reason(reason), |
| 3506 extension(extension), | 3506 extension(extension), |
| 3507 permissions(permissions) {} | 3507 permissions(permissions) {} |
| OLD | NEW |