| 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 "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/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 943 return false; | 943 return false; |
| 944 return true; | 944 return true; |
| 945 } | 945 } |
| 946 | 946 |
| 947 bool Extension::LoadName(string16* error) { | 947 bool Extension::LoadName(string16* error) { |
| 948 string16 localized_name; | 948 string16 localized_name; |
| 949 if (!manifest_->GetString(keys::kName, &localized_name)) { | 949 if (!manifest_->GetString(keys::kName, &localized_name)) { |
| 950 *error = ASCIIToUTF16(errors::kInvalidName); | 950 *error = ASCIIToUTF16(errors::kInvalidName); |
| 951 return false; | 951 return false; |
| 952 } | 952 } |
| 953 non_localized_name_ = UTF16ToUTF8(localized_name); | |
| 954 base::i18n::AdjustStringForLocaleDirection(&localized_name); | 953 base::i18n::AdjustStringForLocaleDirection(&localized_name); |
| 955 name_ = UTF16ToUTF8(localized_name); | 954 name_ = UTF16ToUTF8(localized_name); |
| 956 return true; | 955 return true; |
| 957 } | 956 } |
| 958 | 957 |
| 959 bool Extension::LoadDescription(string16* error) { | 958 bool Extension::LoadDescription(string16* error) { |
| 960 if (manifest_->HasKey(keys::kDescription) && | 959 if (manifest_->HasKey(keys::kDescription) && |
| 961 !manifest_->GetString(keys::kDescription, &description_)) { | 960 !manifest_->GetString(keys::kDescription, &description_)) { |
| 962 *error = ASCIIToUTF16(errors::kInvalidDescription); | 961 *error = ASCIIToUTF16(errors::kInvalidDescription); |
| 963 return false; | 962 return false; |
| (...skipping 2580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3544 already_disabled(false), | 3543 already_disabled(false), |
| 3545 extension(extension) {} | 3544 extension(extension) {} |
| 3546 | 3545 |
| 3547 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 3546 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
| 3548 const Extension* extension, | 3547 const Extension* extension, |
| 3549 const ExtensionPermissionSet* permissions, | 3548 const ExtensionPermissionSet* permissions, |
| 3550 Reason reason) | 3549 Reason reason) |
| 3551 : reason(reason), | 3550 : reason(reason), |
| 3552 extension(extension), | 3551 extension(extension), |
| 3553 permissions(permissions) {} | 3552 permissions(permissions) {} |
| OLD | NEW |