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

Side by Side Diff: chromeos/network/onc/onc_mapper.cc

Issue 2843813002: Remove SetWithoutPathExpansion (Closed)
Patch Set: Fix CrOS Error Created 3 years, 7 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
« no previous file with comments | « chromeos/network/network_util.cc ('k') | chromeos/network/onc/onc_merger.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chromeos/network/onc/onc_mapper.h" 5 #include "chromeos/network/onc/onc_mapper.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 for (base::DictionaryValue::Iterator it(onc_object); !it.IsAtEnd(); 75 for (base::DictionaryValue::Iterator it(onc_object); !it.IsAtEnd();
76 it.Advance()) { 76 it.Advance()) {
77 bool current_field_unknown = false; 77 bool current_field_unknown = false;
78 std::unique_ptr<base::Value> result_value = 78 std::unique_ptr<base::Value> result_value =
79 MapField(it.key(), object_signature, it.value(), &current_field_unknown, 79 MapField(it.key(), object_signature, it.value(), &current_field_unknown,
80 nested_error); 80 nested_error);
81 81
82 if (current_field_unknown) 82 if (current_field_unknown)
83 *found_unknown_field = true; 83 *found_unknown_field = true;
84 else if (result_value.get() != NULL) 84 else if (result_value.get() != NULL)
85 result->SetWithoutPathExpansion(it.key(), result_value.release()); 85 result->SetWithoutPathExpansion(it.key(), std::move(result_value));
86 else 86 else
87 DCHECK(*nested_error); 87 DCHECK(*nested_error);
88 } 88 }
89 } 89 }
90 90
91 std::unique_ptr<base::Value> Mapper::MapField( 91 std::unique_ptr<base::Value> Mapper::MapField(
92 const std::string& field_name, 92 const std::string& field_name,
93 const OncValueSignature& object_signature, 93 const OncValueSignature& object_signature,
94 const base::Value& onc_value, 94 const base::Value& onc_value,
95 bool* found_unknown_field, 95 bool* found_unknown_field,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 std::unique_ptr<base::Value> Mapper::MapEntry( 135 std::unique_ptr<base::Value> Mapper::MapEntry(
136 int index, 136 int index,
137 const OncValueSignature& signature, 137 const OncValueSignature& signature,
138 const base::Value& onc_value, 138 const base::Value& onc_value,
139 bool* error) { 139 bool* error) {
140 return MapValue(signature, onc_value, error); 140 return MapValue(signature, onc_value, error);
141 } 141 }
142 142
143 } // namespace onc 143 } // namespace onc
144 } // namespace chromeos 144 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_util.cc ('k') | chromeos/network/onc/onc_merger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698