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

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

Issue 5848005: base/version: remove wstring version (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: retry 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/upgrade_detector.cc ('k') | chrome/installer/setup/setup_util.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 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after
1259 // Initialize the URL. 1259 // Initialize the URL.
1260 extension_url_ = 1260 extension_url_ =
1261 Extension::GetBaseURLFromExtensionId(id()); 1261 Extension::GetBaseURLFromExtensionId(id());
1262 1262
1263 // Initialize version. 1263 // Initialize version.
1264 std::string version_str; 1264 std::string version_str;
1265 if (!source.GetString(keys::kVersion, &version_str)) { 1265 if (!source.GetString(keys::kVersion, &version_str)) {
1266 *error = errors::kInvalidVersion; 1266 *error = errors::kInvalidVersion;
1267 return false; 1267 return false;
1268 } 1268 }
1269 version_.reset( 1269 version_.reset(Version::GetVersionFromString(version_str));
1270 Version::GetVersionFromString(version_str));
1271 if (!version_.get() || 1270 if (!version_.get() ||
1272 version_->components().size() > 4) { 1271 version_->components().size() > 4) {
1273 *error = errors::kInvalidVersion; 1272 *error = errors::kInvalidVersion;
1274 return false; 1273 return false;
1275 } 1274 }
1276 1275
1277 // Initialize name. 1276 // Initialize name.
1278 string16 localized_name; 1277 string16 localized_name;
1279 if (!source.GetString(keys::kName, &localized_name)) { 1278 if (!source.GetString(keys::kName, &localized_name)) {
1280 *error = errors::kInvalidName; 1279 *error = errors::kInvalidName;
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
2254 UninstalledExtensionInfo::UninstalledExtensionInfo( 2253 UninstalledExtensionInfo::UninstalledExtensionInfo(
2255 const Extension& extension) 2254 const Extension& extension)
2256 : extension_id(extension.id()), 2255 : extension_id(extension.id()),
2257 extension_api_permissions(extension.api_permissions()), 2256 extension_api_permissions(extension.api_permissions()),
2258 is_theme(extension.is_theme()), 2257 is_theme(extension.is_theme()),
2259 is_app(extension.is_app()), 2258 is_app(extension.is_app()),
2260 converted_from_user_script(extension.converted_from_user_script()), 2259 converted_from_user_script(extension.converted_from_user_script()),
2261 update_url(extension.update_url()) {} 2260 update_url(extension.update_url()) {}
2262 2261
2263 UninstalledExtensionInfo::~UninstalledExtensionInfo() {} 2262 UninstalledExtensionInfo::~UninstalledExtensionInfo() {}
OLDNEW
« no previous file with comments | « chrome/browser/upgrade_detector.cc ('k') | chrome/installer/setup/setup_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698