| 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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 if (manifest_->HasKey(keys::kConvertedFromUserScript)) { | 550 if (manifest_->HasKey(keys::kConvertedFromUserScript)) { |
| 551 manifest_->GetBoolean(keys::kConvertedFromUserScript, | 551 manifest_->GetBoolean(keys::kConvertedFromUserScript, |
| 552 &converted_from_user_script_); | 552 &converted_from_user_script_); |
| 553 } | 553 } |
| 554 | 554 |
| 555 if (!LoadSharedFeatures(error)) | 555 if (!LoadSharedFeatures(error)) |
| 556 return false; | 556 return false; |
| 557 | 557 |
| 558 finished_parsing_manifest_ = true; | 558 finished_parsing_manifest_ = true; |
| 559 | 559 |
| 560 permissions_data_->InitializeManifestPermissions(this); |
| 560 permissions_data_->FinalizePermissions(this); | 561 permissions_data_->FinalizePermissions(this); |
| 561 | 562 |
| 562 return true; | 563 return true; |
| 563 } | 564 } |
| 564 | 565 |
| 565 bool Extension::LoadRequiredFeatures(string16* error) { | 566 bool Extension::LoadRequiredFeatures(string16* error) { |
| 566 if (!LoadName(error) || | 567 if (!LoadName(error) || |
| 567 !LoadVersion(error)) | 568 !LoadVersion(error)) |
| 568 return false; | 569 return false; |
| 569 return true; | 570 return true; |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 | 785 |
| 785 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 786 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
| 786 const Extension* extension, | 787 const Extension* extension, |
| 787 const PermissionSet* permissions, | 788 const PermissionSet* permissions, |
| 788 Reason reason) | 789 Reason reason) |
| 789 : reason(reason), | 790 : reason(reason), |
| 790 extension(extension), | 791 extension(extension), |
| 791 permissions(permissions) {} | 792 permissions(permissions) {} |
| 792 | 793 |
| 793 } // namespace extensions | 794 } // namespace extensions |
| OLD | NEW |