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 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1337 } | 1337 } |
1338 | 1338 |
1339 scoped_ptr<Version> minimum_version( | 1339 scoped_ptr<Version> minimum_version( |
1340 Version::GetVersionFromString(minimum_version_string)); | 1340 Version::GetVersionFromString(minimum_version_string)); |
1341 if (!minimum_version.get()) { | 1341 if (!minimum_version.get()) { |
1342 *error = errors::kInvalidMinimumChromeVersion; | 1342 *error = errors::kInvalidMinimumChromeVersion; |
1343 return false; | 1343 return false; |
1344 } | 1344 } |
1345 | 1345 |
1346 chrome::VersionInfo current_version_info; | 1346 chrome::VersionInfo current_version_info; |
1347 if (!current_version_info.is_valid()) { | |
1348 NOTREACHED(); | |
1349 return false; | |
1350 } | |
1351 | |
1352 scoped_ptr<Version> current_version( | 1347 scoped_ptr<Version> current_version( |
1353 Version::GetVersionFromString(current_version_info.Version())); | 1348 Version::GetVersionFromString(current_version_info.Version())); |
1354 if (!current_version.get()) { | 1349 if (!current_version.get()) { |
1355 DCHECK(false); | 1350 DCHECK(false); |
1356 return false; | 1351 return false; |
1357 } | 1352 } |
1358 | 1353 |
1359 if (current_version->CompareTo(*minimum_version) < 0) { | 1354 if (current_version->CompareTo(*minimum_version) < 0) { |
1360 *error = ExtensionErrorUtils::FormatErrorMessage( | 1355 *error = ExtensionErrorUtils::FormatErrorMessage( |
1361 errors::kChromeVersionTooLow, | 1356 errors::kChromeVersionTooLow, |
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2255 UninstalledExtensionInfo::UninstalledExtensionInfo( | 2250 UninstalledExtensionInfo::UninstalledExtensionInfo( |
2256 const Extension& extension) | 2251 const Extension& extension) |
2257 : extension_id(extension.id()), | 2252 : extension_id(extension.id()), |
2258 extension_api_permissions(extension.api_permissions()), | 2253 extension_api_permissions(extension.api_permissions()), |
2259 is_theme(extension.is_theme()), | 2254 is_theme(extension.is_theme()), |
2260 is_app(extension.is_app()), | 2255 is_app(extension.is_app()), |
2261 converted_from_user_script(extension.converted_from_user_script()), | 2256 converted_from_user_script(extension.converted_from_user_script()), |
2262 update_url(extension.update_url()) {} | 2257 update_url(extension.update_url()) {} |
2263 | 2258 |
2264 UninstalledExtensionInfo::~UninstalledExtensionInfo() {} | 2259 UninstalledExtensionInfo::~UninstalledExtensionInfo() {} |
OLD | NEW |