| 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 1816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1827 Value* allow_js_access = NULL; | 1827 Value* allow_js_access = NULL; |
| 1828 if (!manifest_->Get(keys::kBackgroundAllowJsAccess, &allow_js_access)) | 1828 if (!manifest_->Get(keys::kBackgroundAllowJsAccess, &allow_js_access)) |
| 1829 return true; | 1829 return true; |
| 1830 | 1830 |
| 1831 if (!allow_js_access->IsType(Value::TYPE_BOOLEAN) || | 1831 if (!allow_js_access->IsType(Value::TYPE_BOOLEAN) || |
| 1832 !allow_js_access->GetAsBoolean(&allow_background_js_access_)) { | 1832 !allow_js_access->GetAsBoolean(&allow_background_js_access_)) { |
| 1833 *error = ASCIIToUTF16(errors::kInvalidBackgroundAllowJsAccess); | 1833 *error = ASCIIToUTF16(errors::kInvalidBackgroundAllowJsAccess); |
| 1834 return false; | 1834 return false; |
| 1835 } | 1835 } |
| 1836 | 1836 |
| 1837 if (!has_background_page()) { | |
| 1838 *error = ASCIIToUTF16(errors::kInvalidBackgroundAllowJsAccessNoPage); | |
| 1839 return false; | |
| 1840 } | |
| 1841 | |
| 1842 return true; | 1837 return true; |
| 1843 } | 1838 } |
| 1844 | 1839 |
| 1845 bool Extension::LoadWebIntentAction(const std::string& action_name, | 1840 bool Extension::LoadWebIntentAction(const std::string& action_name, |
| 1846 const DictionaryValue& intent_service, | 1841 const DictionaryValue& intent_service, |
| 1847 string16* error) { | 1842 string16* error) { |
| 1848 DCHECK(error); | 1843 DCHECK(error); |
| 1849 webkit_glue::WebIntentServiceData service; | 1844 webkit_glue::WebIntentServiceData service; |
| 1850 std::string value; | 1845 std::string value; |
| 1851 | 1846 |
| (...skipping 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3567 already_disabled(false), | 3562 already_disabled(false), |
| 3568 extension(extension) {} | 3563 extension(extension) {} |
| 3569 | 3564 |
| 3570 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 3565 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
| 3571 const Extension* extension, | 3566 const Extension* extension, |
| 3572 const ExtensionPermissionSet* permissions, | 3567 const ExtensionPermissionSet* permissions, |
| 3573 Reason reason) | 3568 Reason reason) |
| 3574 : reason(reason), | 3569 : reason(reason), |
| 3575 extension(extension), | 3570 extension(extension), |
| 3576 permissions(permissions) {} | 3571 permissions(permissions) {} |
| OLD | NEW |