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

Side by Side Diff: tools/json_schema_compiler/test/test_util.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 | « tools/json_schema_compiler/test/test_util.h ('k') | ui/app_list/search/history_data_store.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 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 "tools/json_schema_compiler/test/test_util.h" 5 #include "tools/json_schema_compiler/test/test_util.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 23 matching lines...) Expand all
34 return list; 34 return list;
35 } 35 }
36 std::unique_ptr<base::ListValue> List(base::Value* a, 36 std::unique_ptr<base::ListValue> List(base::Value* a,
37 base::Value* b, 37 base::Value* b,
38 base::Value* c) { 38 base::Value* c) {
39 std::unique_ptr<base::ListValue> list = List(a, b); 39 std::unique_ptr<base::ListValue> list = List(a, b);
40 list->Append(base::WrapUnique(c)); 40 list->Append(base::WrapUnique(c));
41 return list; 41 return list;
42 } 42 }
43 43
44 std::unique_ptr<base::DictionaryValue> Dictionary(const std::string& ak, 44 std::unique_ptr<base::DictionaryValue> Dictionary(
45 base::Value* av) { 45 const std::string& ak,
46 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 46 std::unique_ptr<base::Value> av) {
47 dict->SetWithoutPathExpansion(ak, av); 47 auto dict = base::MakeUnique<base::DictionaryValue>();
48 dict->SetWithoutPathExpansion(ak, std::move(av));
48 return dict; 49 return dict;
49 } 50 }
50 std::unique_ptr<base::DictionaryValue> Dictionary(const std::string& ak, 51 std::unique_ptr<base::DictionaryValue> Dictionary(
51 base::Value* av, 52 const std::string& ak,
52 const std::string& bk, 53 std::unique_ptr<base::Value> av,
53 base::Value* bv) { 54 const std::string& bk,
54 std::unique_ptr<base::DictionaryValue> dict = Dictionary(ak, av); 55 std::unique_ptr<base::Value> bv) {
55 dict->SetWithoutPathExpansion(bk, bv); 56 std::unique_ptr<base::DictionaryValue> dict = Dictionary(ak, std::move(av));
57 dict->SetWithoutPathExpansion(bk, std::move(bv));
56 return dict; 58 return dict;
57 } 59 }
58 std::unique_ptr<base::DictionaryValue> Dictionary(const std::string& ak, 60 std::unique_ptr<base::DictionaryValue> Dictionary(
59 base::Value* av, 61 const std::string& ak,
60 const std::string& bk, 62 std::unique_ptr<base::Value> av,
61 base::Value* bv, 63 const std::string& bk,
62 const std::string& ck, 64 std::unique_ptr<base::Value> bv,
63 base::Value* cv) { 65 const std::string& ck,
64 std::unique_ptr<base::DictionaryValue> dict = Dictionary(ak, av, bk, bv); 66 std::unique_ptr<base::Value> cv) {
65 dict->SetWithoutPathExpansion(ck, cv); 67 std::unique_ptr<base::DictionaryValue> dict =
68 Dictionary(ak, std::move(av), bk, std::move(bv));
69 dict->SetWithoutPathExpansion(ck, std::move(cv));
66 return dict; 70 return dict;
67 } 71 }
68 72
69 } // namespace test_util 73 } // namespace test_util
70 } // namespace json_schema_compiler 74 } // namespace json_schema_compiler
OLDNEW
« no previous file with comments | « tools/json_schema_compiler/test/test_util.h ('k') | ui/app_list/search/history_data_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698