| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 // Load App settings. LoadExtent at least has to be done before | 707 // Load App settings. LoadExtent at least has to be done before |
| 708 // ParsePermissions(), because the valid permissions depend on what type of | 708 // ParsePermissions(), because the valid permissions depend on what type of |
| 709 // package this is. | 709 // package this is. |
| 710 if (is_app() && !LoadAppFeatures(error)) | 710 if (is_app() && !LoadAppFeatures(error)) |
| 711 return false; | 711 return false; |
| 712 | 712 |
| 713 permissions_data_.reset(new PermissionsData); | 713 permissions_data_.reset(new PermissionsData); |
| 714 if (!permissions_data_->ParsePermissions(this, error)) | 714 if (!permissions_data_->ParsePermissions(this, error)) |
| 715 return false; | 715 return false; |
| 716 | 716 |
| 717 if (!LoadSharedFeatures(error)) | |
| 718 return false; | |
| 719 | |
| 720 if (manifest_->HasKey(keys::kConvertedFromUserScript)) { | 717 if (manifest_->HasKey(keys::kConvertedFromUserScript)) { |
| 721 manifest_->GetBoolean(keys::kConvertedFromUserScript, | 718 manifest_->GetBoolean(keys::kConvertedFromUserScript, |
| 722 &converted_from_user_script_); | 719 &converted_from_user_script_); |
| 723 } | 720 } |
| 724 | 721 |
| 722 if (!LoadSharedFeatures(error)) |
| 723 return false; |
| 724 |
| 725 if (HasMultipleUISurfaces()) { | 725 if (HasMultipleUISurfaces()) { |
| 726 *error = ASCIIToUTF16(errors::kOneUISurfaceOnly); | 726 *error = ASCIIToUTF16(errors::kOneUISurfaceOnly); |
| 727 return false; | 727 return false; |
| 728 } | 728 } |
| 729 | 729 |
| 730 finished_parsing_manifest_ = true; | 730 finished_parsing_manifest_ = true; |
| 731 | 731 |
| 732 permissions_data_->FinalizePermissions(this); | 732 permissions_data_->FinalizePermissions(this); |
| 733 | 733 |
| 734 return true; | 734 return true; |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1239 | 1239 |
| 1240 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 1240 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
| 1241 const Extension* extension, | 1241 const Extension* extension, |
| 1242 const PermissionSet* permissions, | 1242 const PermissionSet* permissions, |
| 1243 Reason reason) | 1243 Reason reason) |
| 1244 : reason(reason), | 1244 : reason(reason), |
| 1245 extension(extension), | 1245 extension(extension), |
| 1246 permissions(permissions) {} | 1246 permissions(permissions) {} |
| 1247 | 1247 |
| 1248 } // namespace extensions | 1248 } // namespace extensions |
| OLD | NEW |