OLD | NEW |
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 Loading... |
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 |
OLD | NEW |