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

Side by Side Diff: extensions/common/file_util.cc

Issue 2539363004: Make base::Value::TYPE a scoped enum. (Closed)
Patch Set: Rebase Created 4 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
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/file_util.h" 5 #include "extensions/common/file_util.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 // in this case, but other code tests for a file error with 254 // in this case, but other code tests for a file error with
255 // error->empty(). For now, be consistent. 255 // error->empty(). For now, be consistent.
256 *error = l10n_util::GetStringUTF8(IDS_EXTENSION_MANIFEST_UNREADABLE); 256 *error = l10n_util::GetStringUTF8(IDS_EXTENSION_MANIFEST_UNREADABLE);
257 } else { 257 } else {
258 *error = base::StringPrintf( 258 *error = base::StringPrintf(
259 "%s %s", manifest_errors::kManifestParseError, error->c_str()); 259 "%s %s", manifest_errors::kManifestParseError, error->c_str());
260 } 260 }
261 return NULL; 261 return NULL;
262 } 262 }
263 263
264 if (!root->IsType(base::Value::TYPE_DICTIONARY)) { 264 if (!root->IsType(base::Value::Type::DICTIONARY)) {
265 *error = l10n_util::GetStringUTF8(IDS_EXTENSION_MANIFEST_INVALID); 265 *error = l10n_util::GetStringUTF8(IDS_EXTENSION_MANIFEST_INVALID);
266 return NULL; 266 return NULL;
267 } 267 }
268 268
269 return base::DictionaryValue::From(std::move(root)); 269 return base::DictionaryValue::From(std::move(root));
270 } 270 }
271 271
272 bool ValidateExtension(const Extension* extension, 272 bool ValidateExtension(const Extension* extension,
273 std::string* error, 273 std::string* error,
274 std::vector<InstallWarning>* warnings) { 274 std::vector<InstallWarning>* warnings) {
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 base::FilePath GetVerifiedContentsPath(const base::FilePath& extension_path) { 620 base::FilePath GetVerifiedContentsPath(const base::FilePath& extension_path) {
621 return extension_path.Append(kMetadataFolder) 621 return extension_path.Append(kMetadataFolder)
622 .Append(kVerifiedContentsFilename); 622 .Append(kVerifiedContentsFilename);
623 } 623 }
624 base::FilePath GetComputedHashesPath(const base::FilePath& extension_path) { 624 base::FilePath GetComputedHashesPath(const base::FilePath& extension_path) {
625 return extension_path.Append(kMetadataFolder).Append(kComputedHashesFilename); 625 return extension_path.Append(kMetadataFolder).Append(kComputedHashesFilename);
626 } 626 }
627 627
628 } // namespace file_util 628 } // namespace file_util
629 } // namespace extensions 629 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/features/json_feature_provider_source.cc ('k') | extensions/common/file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698