| 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 "extensions/common/extension.h" | 5 #include "extensions/common/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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 name_ = base::UTF16ToUTF8(localized_name); | 583 name_ = base::UTF16ToUTF8(localized_name); |
| 584 return true; | 584 return true; |
| 585 } | 585 } |
| 586 | 586 |
| 587 bool Extension::LoadVersion(base::string16* error) { | 587 bool Extension::LoadVersion(base::string16* error) { |
| 588 std::string version_str; | 588 std::string version_str; |
| 589 if (!manifest_->GetString(keys::kVersion, &version_str)) { | 589 if (!manifest_->GetString(keys::kVersion, &version_str)) { |
| 590 *error = base::ASCIIToUTF16(errors::kInvalidVersion); | 590 *error = base::ASCIIToUTF16(errors::kInvalidVersion); |
| 591 return false; | 591 return false; |
| 592 } | 592 } |
| 593 version_.reset(new base::Version(version_str)); | 593 version_.reset(new Version(version_str)); |
| 594 if (!version_->IsValid() || version_->components().size() > 4) { | 594 if (!version_->IsValid() || version_->components().size() > 4) { |
| 595 *error = base::ASCIIToUTF16(errors::kInvalidVersion); | 595 *error = base::ASCIIToUTF16(errors::kInvalidVersion); |
| 596 return false; | 596 return false; |
| 597 } | 597 } |
| 598 return true; | 598 return true; |
| 599 } | 599 } |
| 600 | 600 |
| 601 bool Extension::LoadAppFeatures(base::string16* error) { | 601 bool Extension::LoadAppFeatures(base::string16* error) { |
| 602 if (!LoadExtent(keys::kWebURLs, &extent_, | 602 if (!LoadExtent(keys::kWebURLs, &extent_, |
| 603 errors::kInvalidWebURLs, errors::kInvalidWebURL, error)) { | 603 errors::kInvalidWebURLs, errors::kInvalidWebURL, error)) { |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 | 787 |
| 788 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 788 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
| 789 const Extension* extension, | 789 const Extension* extension, |
| 790 const PermissionSet* permissions, | 790 const PermissionSet* permissions, |
| 791 Reason reason) | 791 Reason reason) |
| 792 : reason(reason), | 792 : reason(reason), |
| 793 extension(extension), | 793 extension(extension), |
| 794 permissions(permissions) {} | 794 permissions(permissions) {} |
| 795 | 795 |
| 796 } // namespace extensions | 796 } // namespace extensions |
| OLD | NEW |