| 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 1867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1878 if (!intent_service.GetString(keys::kIntentHref, &href)) { | 1878 if (!intent_service.GetString(keys::kIntentHref, &href)) { |
| 1879 *error = ASCIIToUTF16(errors::kInvalidIntentHref); | 1879 *error = ASCIIToUTF16(errors::kInvalidIntentHref); |
| 1880 return false; | 1880 return false; |
| 1881 } | 1881 } |
| 1882 } | 1882 } |
| 1883 | 1883 |
| 1884 // For packaged/hosted apps, empty href implies the respective launch URLs. | 1884 // For packaged/hosted apps, empty href implies the respective launch URLs. |
| 1885 if (href.empty()) { | 1885 if (href.empty()) { |
| 1886 if (is_hosted_app()) { | 1886 if (is_hosted_app()) { |
| 1887 href = launch_web_url(); | 1887 href = launch_web_url(); |
| 1888 } else if (is_packaged_app()) { | 1888 } else if (is_packaged_app() || is_platform_app()) { |
| 1889 href = launch_local_path(); | 1889 href = launch_local_path(); |
| 1890 } | 1890 } |
| 1891 } | 1891 } |
| 1892 | 1892 |
| 1893 // If we still don't have an href, the manifest is malformed. | 1893 // If we still don't have an href, the manifest is malformed. |
| 1894 if (href.empty()) { | 1894 if (href.empty()) { |
| 1895 *error = ExtensionErrorUtils::FormatErrorMessageUTF16( | 1895 *error = ExtensionErrorUtils::FormatErrorMessageUTF16( |
| 1896 errors::kInvalidIntentHrefEmpty, action_name); | 1896 errors::kInvalidIntentHrefEmpty, action_name); |
| 1897 return false; | 1897 return false; |
| 1898 } | 1898 } |
| (...skipping 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3567 already_disabled(false), | 3567 already_disabled(false), |
| 3568 extension(extension) {} | 3568 extension(extension) {} |
| 3569 | 3569 |
| 3570 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 3570 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
| 3571 const Extension* extension, | 3571 const Extension* extension, |
| 3572 const ExtensionPermissionSet* permissions, | 3572 const ExtensionPermissionSet* permissions, |
| 3573 Reason reason) | 3573 Reason reason) |
| 3574 : reason(reason), | 3574 : reason(reason), |
| 3575 extension(extension), | 3575 extension(extension), |
| 3576 permissions(permissions) {} | 3576 permissions(permissions) {} |
| OLD | NEW |