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

Side by Side Diff: extensions/common/manifest_handlers/shared_module_info.cc

Issue 2259383002: Consistently use namespaced base::Version in extensions code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months 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
« no previous file with comments | « extensions/common/extension.cc ('k') | extensions/common/update_manifest.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "extensions/common/manifest_handlers/shared_module_info.h" 5 #include "extensions/common/manifest_handlers/shared_module_info.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 } 180 }
181 imports_.back().extension_id = extension_id; 181 imports_.back().extension_id = extension_id;
182 if (import_entry->HasKey(keys::kMinimumVersion)) { 182 if (import_entry->HasKey(keys::kMinimumVersion)) {
183 std::string min_version; 183 std::string min_version;
184 if (!import_entry->GetString(keys::kMinimumVersion, &min_version)) { 184 if (!import_entry->GetString(keys::kMinimumVersion, &min_version)) {
185 *error = ErrorUtils::FormatErrorMessageUTF16( 185 *error = ErrorUtils::FormatErrorMessageUTF16(
186 errors::kInvalidImportVersion, base::SizeTToString(i)); 186 errors::kInvalidImportVersion, base::SizeTToString(i));
187 return false; 187 return false;
188 } 188 }
189 imports_.back().minimum_version = min_version; 189 imports_.back().minimum_version = min_version;
190 Version v(min_version); 190 base::Version v(min_version);
191 if (!v.IsValid()) { 191 if (!v.IsValid()) {
192 *error = ErrorUtils::FormatErrorMessageUTF16( 192 *error = ErrorUtils::FormatErrorMessageUTF16(
193 errors::kInvalidImportVersion, base::SizeTToString(i)); 193 errors::kInvalidImportVersion, base::SizeTToString(i));
194 return false; 194 return false;
195 } 195 }
196 } 196 }
197 } 197 }
198 } 198 }
199 return true; 199 return true;
200 } 200 }
(...skipping 30 matching lines...) Expand all
231 231
232 const std::vector<std::string> SharedModuleHandler::Keys() const { 232 const std::vector<std::string> SharedModuleHandler::Keys() const {
233 static const char* keys[] = { 233 static const char* keys[] = {
234 keys::kExport, 234 keys::kExport,
235 keys::kImport 235 keys::kImport
236 }; 236 };
237 return std::vector<std::string>(keys, keys + arraysize(keys)); 237 return std::vector<std::string>(keys, keys + arraysize(keys));
238 } 238 }
239 239
240 } // namespace extensions 240 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/extension.cc ('k') | extensions/common/update_manifest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698