OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/test_runner/tracked_dictionary.h" | 5 #include "components/test_runner/tracked_dictionary.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 if (current_values_.Get(path, &old_value)) { | 33 if (current_values_.Get(path, &old_value)) { |
34 if (base::Value::Equals(old_value, new_value.get())) | 34 if (base::Value::Equals(old_value, new_value.get())) |
35 return; | 35 return; |
36 } | 36 } |
37 | 37 |
38 changed_values_.Set(path, new_value->CreateDeepCopy()); | 38 changed_values_.Set(path, new_value->CreateDeepCopy()); |
39 current_values_.Set(path, std::move(new_value)); | 39 current_values_.Set(path, std::move(new_value)); |
40 } | 40 } |
41 | 41 |
42 void TrackedDictionary::SetBoolean(const std::string& path, bool new_value) { | 42 void TrackedDictionary::SetBoolean(const std::string& path, bool new_value) { |
43 Set(path, base::MakeUnique<base::FundamentalValue>(new_value)); | 43 Set(path, base::MakeUnique<base::Value>(new_value)); |
44 } | 44 } |
45 | 45 |
46 void TrackedDictionary::SetString(const std::string& path, | 46 void TrackedDictionary::SetString(const std::string& path, |
47 const std::string& new_value) { | 47 const std::string& new_value) { |
48 Set(path, base::MakeUnique<base::StringValue>(new_value)); | 48 Set(path, base::MakeUnique<base::StringValue>(new_value)); |
49 } | 49 } |
50 | 50 |
51 } // namespace test_runner | 51 } // namespace test_runner |
OLD | NEW |