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

Side by Side Diff: chrome/installer/util/uninstall_metrics.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 "chrome/installer/util/uninstall_metrics.h" 5 #include "chrome/installer/util/uninstall_metrics.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 bool ExtractUninstallMetricsFromFile(const base::FilePath& file_path, 76 bool ExtractUninstallMetricsFromFile(const base::FilePath& file_path,
77 base::string16* uninstall_metrics_string) { 77 base::string16* uninstall_metrics_string) {
78 JSONFileValueDeserializer json_deserializer(file_path); 78 JSONFileValueDeserializer json_deserializer(file_path);
79 79
80 std::string json_error_string; 80 std::string json_error_string;
81 std::unique_ptr<base::Value> root = json_deserializer.Deserialize(NULL, NULL); 81 std::unique_ptr<base::Value> root = json_deserializer.Deserialize(NULL, NULL);
82 if (!root.get()) 82 if (!root.get())
83 return false; 83 return false;
84 84
85 // Preferences should always have a dictionary root. 85 // Preferences should always have a dictionary root.
86 if (!root->IsType(base::Value::TYPE_DICTIONARY)) 86 if (!root->IsType(base::Value::Type::DICTIONARY))
87 return false; 87 return false;
88 88
89 return ExtractUninstallMetrics( 89 return ExtractUninstallMetrics(
90 *static_cast<base::DictionaryValue*>(root.get()), 90 *static_cast<base::DictionaryValue*>(root.get()),
91 uninstall_metrics_string); 91 uninstall_metrics_string);
92 } 92 }
93 93
94 } // namespace installer 94 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/util/master_preferences.cc ('k') | chrome/renderer/extensions/cast_streaming_native_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698