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 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1128 return false; | 1128 return false; |
1129 return true; | 1129 return true; |
1130 } | 1130 } |
1131 | 1131 |
1132 bool Extension::LoadName(string16* error) { | 1132 bool Extension::LoadName(string16* error) { |
1133 string16 localized_name; | 1133 string16 localized_name; |
1134 if (!manifest_->GetString(keys::kName, &localized_name)) { | 1134 if (!manifest_->GetString(keys::kName, &localized_name)) { |
1135 *error = ASCIIToUTF16(errors::kInvalidName); | 1135 *error = ASCIIToUTF16(errors::kInvalidName); |
1136 return false; | 1136 return false; |
1137 } | 1137 } |
| 1138 non_localized_name_ = UTF16ToUTF8(localized_name); |
1138 base::i18n::AdjustStringForLocaleDirection(&localized_name); | 1139 base::i18n::AdjustStringForLocaleDirection(&localized_name); |
1139 name_ = UTF16ToUTF8(localized_name); | 1140 name_ = UTF16ToUTF8(localized_name); |
1140 return true; | 1141 return true; |
1141 } | 1142 } |
1142 | 1143 |
1143 bool Extension::LoadDescription(string16* error) { | 1144 bool Extension::LoadDescription(string16* error) { |
1144 if (manifest_->HasKey(keys::kDescription) && | 1145 if (manifest_->HasKey(keys::kDescription) && |
1145 !manifest_->GetString(keys::kDescription, &description_)) { | 1146 !manifest_->GetString(keys::kDescription, &description_)) { |
1146 *error = ASCIIToUTF16(errors::kInvalidDescription); | 1147 *error = ASCIIToUTF16(errors::kInvalidDescription); |
1147 return false; | 1148 return false; |
(...skipping 2556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3704 already_disabled(false), | 3705 already_disabled(false), |
3705 extension(extension) {} | 3706 extension(extension) {} |
3706 | 3707 |
3707 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( | 3708 UpdatedExtensionPermissionsInfo::UpdatedExtensionPermissionsInfo( |
3708 const Extension* extension, | 3709 const Extension* extension, |
3709 const ExtensionPermissionSet* permissions, | 3710 const ExtensionPermissionSet* permissions, |
3710 Reason reason) | 3711 Reason reason) |
3711 : reason(reason), | 3712 : reason(reason), |
3712 extension(extension), | 3713 extension(extension), |
3713 permissions(permissions) {} | 3714 permissions(permissions) {} |
OLD | NEW |