Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1336)

Side by Side Diff: chrome/common/extensions/extension.cc

Issue 5905006: Revert 69490 - base/version: remove wstring version... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/views/about_chrome_view.cc ('k') | chrome_frame/dll_redirector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 // Initialize the URL. 1260 // Initialize the URL.
1261 extension_url_ = 1261 extension_url_ =
1262 Extension::GetBaseURLFromExtensionId(id()); 1262 Extension::GetBaseURLFromExtensionId(id());
1263 1263
1264 // Initialize version. 1264 // Initialize version.
1265 std::string version_str; 1265 std::string version_str;
1266 if (!source.GetString(keys::kVersion, &version_str)) { 1266 if (!source.GetString(keys::kVersion, &version_str)) {
1267 *error = errors::kInvalidVersion; 1267 *error = errors::kInvalidVersion;
1268 return false; 1268 return false;
1269 } 1269 }
1270 version_.reset(Version::GetVersionFromString(version_str)); 1270 version_.reset(
1271 Version::GetVersionFromString(version_str));
1271 if (!version_.get() || 1272 if (!version_.get() ||
1272 version_->components().size() > 4) { 1273 version_->components().size() > 4) {
1273 *error = errors::kInvalidVersion; 1274 *error = errors::kInvalidVersion;
1274 return false; 1275 return false;
1275 } 1276 }
1276 1277
1277 // Initialize name. 1278 // Initialize name.
1278 string16 localized_name; 1279 string16 localized_name;
1279 if (!source.GetString(keys::kName, &localized_name)) { 1280 if (!source.GetString(keys::kName, &localized_name)) {
1280 *error = errors::kInvalidName; 1281 *error = errors::kInvalidName;
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
2254 UninstalledExtensionInfo::UninstalledExtensionInfo( 2255 UninstalledExtensionInfo::UninstalledExtensionInfo(
2255 const Extension& extension) 2256 const Extension& extension)
2256 : extension_id(extension.id()), 2257 : extension_id(extension.id()),
2257 extension_api_permissions(extension.api_permissions()), 2258 extension_api_permissions(extension.api_permissions()),
2258 is_theme(extension.is_theme()), 2259 is_theme(extension.is_theme()),
2259 is_app(extension.is_app()), 2260 is_app(extension.is_app()),
2260 converted_from_user_script(extension.converted_from_user_script()), 2261 converted_from_user_script(extension.converted_from_user_script()),
2261 update_url(extension.update_url()) {} 2262 update_url(extension.update_url()) {}
2262 2263
2263 UninstalledExtensionInfo::~UninstalledExtensionInfo() {} 2264 UninstalledExtensionInfo::~UninstalledExtensionInfo() {}
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/about_chrome_view.cc ('k') | chrome_frame/dll_redirector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698