OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
(...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1227 *error = errors::kInvalidVersion; | 1227 *error = errors::kInvalidVersion; |
1228 return false; | 1228 return false; |
1229 } | 1229 } |
1230 | 1230 |
1231 // Initialize name. | 1231 // Initialize name. |
1232 string16 localized_name; | 1232 string16 localized_name; |
1233 if (!source.GetString(keys::kName, &localized_name)) { | 1233 if (!source.GetString(keys::kName, &localized_name)) { |
1234 *error = errors::kInvalidName; | 1234 *error = errors::kInvalidName; |
1235 return false; | 1235 return false; |
1236 } | 1236 } |
1237 base::i18n::AdjustStringForLocaleDirection(localized_name, &localized_name); | 1237 base::i18n::AdjustStringForLocaleDirection(&localized_name); |
1238 name_ = UTF16ToUTF8(localized_name); | 1238 name_ = UTF16ToUTF8(localized_name); |
1239 | 1239 |
1240 // Initialize description (if present). | 1240 // Initialize description (if present). |
1241 if (source.HasKey(keys::kDescription)) { | 1241 if (source.HasKey(keys::kDescription)) { |
1242 if (!source.GetString(keys::kDescription, | 1242 if (!source.GetString(keys::kDescription, |
1243 &description_)) { | 1243 &description_)) { |
1244 *error = errors::kInvalidDescription; | 1244 *error = errors::kInvalidDescription; |
1245 return false; | 1245 return false; |
1246 } | 1246 } |
1247 } | 1247 } |
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2209 UninstalledExtensionInfo::UninstalledExtensionInfo( | 2209 UninstalledExtensionInfo::UninstalledExtensionInfo( |
2210 const Extension& extension) | 2210 const Extension& extension) |
2211 : extension_id(extension.id()), | 2211 : extension_id(extension.id()), |
2212 extension_api_permissions(extension.api_permissions()), | 2212 extension_api_permissions(extension.api_permissions()), |
2213 is_theme(extension.is_theme()), | 2213 is_theme(extension.is_theme()), |
2214 is_app(extension.is_app()), | 2214 is_app(extension.is_app()), |
2215 converted_from_user_script(extension.converted_from_user_script()), | 2215 converted_from_user_script(extension.converted_from_user_script()), |
2216 update_url(extension.update_url()) {} | 2216 update_url(extension.update_url()) {} |
2217 | 2217 |
2218 UninstalledExtensionInfo::~UninstalledExtensionInfo() {} | 2218 UninstalledExtensionInfo::~UninstalledExtensionInfo() {} |
OLD | NEW |