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

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

Issue 109673004: Revert "Update all users of base::Version to explicitly specify the namespace, and clean up the hea… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « extensions/common/extension.cc ('k') | gpu/config/gpu_info.h » ('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 "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 168 }
169 imports_.back().extension_id = extension_id; 169 imports_.back().extension_id = extension_id;
170 if (import_entry->HasKey(keys::kMinimumVersion)) { 170 if (import_entry->HasKey(keys::kMinimumVersion)) {
171 std::string min_version; 171 std::string min_version;
172 if (!import_entry->GetString(keys::kMinimumVersion, &min_version)) { 172 if (!import_entry->GetString(keys::kMinimumVersion, &min_version)) {
173 *error = ErrorUtils::FormatErrorMessageUTF16( 173 *error = ErrorUtils::FormatErrorMessageUTF16(
174 errors::kInvalidImportVersion, base::IntToString(i)); 174 errors::kInvalidImportVersion, base::IntToString(i));
175 return false; 175 return false;
176 } 176 }
177 imports_.back().minimum_version = min_version; 177 imports_.back().minimum_version = min_version;
178 base::Version v(min_version); 178 Version v(min_version);
179 if (!v.IsValid()) { 179 if (!v.IsValid()) {
180 *error = ErrorUtils::FormatErrorMessageUTF16( 180 *error = ErrorUtils::FormatErrorMessageUTF16(
181 errors::kInvalidImportVersion, base::IntToString(i)); 181 errors::kInvalidImportVersion, base::IntToString(i));
182 return false; 182 return false;
183 } 183 }
184 } 184 }
185 } 185 }
186 } 186 }
187 return true; 187 return true;
188 } 188 }
(...skipping 30 matching lines...) Expand all
219 219
220 const std::vector<std::string> SharedModuleHandler::Keys() const { 220 const std::vector<std::string> SharedModuleHandler::Keys() const {
221 static const char* keys[] = { 221 static const char* keys[] = {
222 keys::kExport, 222 keys::kExport,
223 keys::kImport 223 keys::kImport
224 }; 224 };
225 return std::vector<std::string>(keys, keys + arraysize(keys)); 225 return std::vector<std::string>(keys, keys + arraysize(keys));
226 } 226 }
227 227
228 } // namespace extensions 228 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/extension.cc ('k') | gpu/config/gpu_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698