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

Side by Side Diff: base/values.cc

Issue 2884933002: Remove raw base::DictionaryValue::SetWithoutPathExpansion (Closed)
Patch Set: Include 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 | « base/values.h ('k') | chromeos/network/onc/onc_translator_shill_to_onc.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 "base/values.h" 5 #include "base/values.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 std::unique_ptr<ListValue> in_value) { 670 std::unique_ptr<ListValue> in_value) {
671 return static_cast<ListValue*>(Set(path, std::move(in_value))); 671 return static_cast<ListValue*>(Set(path, std::move(in_value)));
672 } 672 }
673 673
674 Value* DictionaryValue::SetWithoutPathExpansion( 674 Value* DictionaryValue::SetWithoutPathExpansion(
675 StringPiece key, 675 StringPiece key,
676 std::unique_ptr<Value> in_value) { 676 std::unique_ptr<Value> in_value) {
677 return ((*dict_)[key.as_string()] = std::move(in_value)).get(); 677 return ((*dict_)[key.as_string()] = std::move(in_value)).get();
678 } 678 }
679 679
680 Value* DictionaryValue::SetWithoutPathExpansion(StringPiece key,
681 Value* in_value) {
682 return SetWithoutPathExpansion(key, WrapUnique(in_value));
683 }
684
685 Value* DictionaryValue::SetBooleanWithoutPathExpansion(StringPiece path, 680 Value* DictionaryValue::SetBooleanWithoutPathExpansion(StringPiece path,
686 bool in_value) { 681 bool in_value) {
687 return SetWithoutPathExpansion(path, MakeUnique<Value>(in_value)); 682 return SetWithoutPathExpansion(path, MakeUnique<Value>(in_value));
688 } 683 }
689 684
690 Value* DictionaryValue::SetIntegerWithoutPathExpansion(StringPiece path, 685 Value* DictionaryValue::SetIntegerWithoutPathExpansion(StringPiece path,
691 int in_value) { 686 int in_value) {
692 return SetWithoutPathExpansion(path, MakeUnique<Value>(in_value)); 687 return SetWithoutPathExpansion(path, MakeUnique<Value>(in_value));
693 } 688 }
694 689
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1335 } 1330 }
1336 1331
1337 std::ostream& operator<<(std::ostream& out, const Value::Type& type) { 1332 std::ostream& operator<<(std::ostream& out, const Value::Type& type) {
1338 if (static_cast<int>(type) < 0 || 1333 if (static_cast<int>(type) < 0 ||
1339 static_cast<size_t>(type) >= arraysize(kTypeNames)) 1334 static_cast<size_t>(type) >= arraysize(kTypeNames))
1340 return out << "Invalid Type (index = " << static_cast<int>(type) << ")"; 1335 return out << "Invalid Type (index = " << static_cast<int>(type) << ")";
1341 return out << Value::GetTypeName(type); 1336 return out << Value::GetTypeName(type);
1342 } 1337 }
1343 1338
1344 } // namespace base 1339 } // namespace base
OLDNEW
« no previous file with comments | « base/values.h ('k') | chromeos/network/onc/onc_translator_shill_to_onc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698