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

Side by Side Diff: extensions/common/value_builder.cc

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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
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 "extensions/common/value_builder.h" 5 #include "extensions/common/value_builder.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 24 matching lines...) Expand all
35 } 35 }
36 36
37 DictionaryBuilder& DictionaryBuilder::Set(const std::string& path, 37 DictionaryBuilder& DictionaryBuilder::Set(const std::string& path,
38 double in_value) { 38 double in_value) {
39 dict_->SetWithoutPathExpansion(path, base::MakeUnique<base::Value>(in_value)); 39 dict_->SetWithoutPathExpansion(path, base::MakeUnique<base::Value>(in_value));
40 return *this; 40 return *this;
41 } 41 }
42 42
43 DictionaryBuilder& DictionaryBuilder::Set(const std::string& path, 43 DictionaryBuilder& DictionaryBuilder::Set(const std::string& path,
44 const std::string& in_value) { 44 const std::string& in_value) {
45 dict_->SetWithoutPathExpansion(path, 45 dict_->SetWithoutPathExpansion(path, base::MakeUnique<base::Value>(in_value));
46 base::MakeUnique<base::StringValue>(in_value));
47 return *this; 46 return *this;
48 } 47 }
49 48
50 DictionaryBuilder& DictionaryBuilder::Set(const std::string& path, 49 DictionaryBuilder& DictionaryBuilder::Set(const std::string& path,
51 const base::string16& in_value) { 50 const base::string16& in_value) {
52 dict_->SetWithoutPathExpansion(path, 51 dict_->SetWithoutPathExpansion(path, base::MakeUnique<base::Value>(in_value));
53 base::MakeUnique<base::StringValue>(in_value));
54 return *this; 52 return *this;
55 } 53 }
56 54
57 DictionaryBuilder& DictionaryBuilder::Set( 55 DictionaryBuilder& DictionaryBuilder::Set(
58 const std::string& path, 56 const std::string& path,
59 std::unique_ptr<base::Value> in_value) { 57 std::unique_ptr<base::Value> in_value) {
60 dict_->SetWithoutPathExpansion(path, std::move(in_value)); 58 dict_->SetWithoutPathExpansion(path, std::move(in_value));
61 return *this; 59 return *this;
62 } 60 }
63 61
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 list_->Append(std::move(in_value)); 96 list_->Append(std::move(in_value));
99 return *this; 97 return *this;
100 } 98 }
101 99
102 ListBuilder& ListBuilder::AppendBoolean(bool in_value) { 100 ListBuilder& ListBuilder::AppendBoolean(bool in_value) {
103 list_->AppendBoolean(in_value); 101 list_->AppendBoolean(in_value);
104 return *this; 102 return *this;
105 } 103 }
106 104
107 } // namespace extensions 105 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/url_pattern_set.cc ('k') | extensions/renderer/activity_log_converter_strategy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698