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

Side by Side Diff: chrome/browser/devtools/serialize_dictionary_forest.h

Issue 2825533002: Introduce SerializeDictionaryForest for devtools_target_ui (Closed)
Patch Set: ChildrenRange, base::Reversed and Value::GetList Created 3 years, 8 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_DEVTOOLS_SERIALIZE_DICTIONARY_FOREST_H_
6 #define CHROME_BROWSER_DEVTOOLS_SERIALIZE_DICTIONARY_FOREST_H_
7
8 #include <vector>
9
10 #include "base/strings/string_piece.h"
11 #include "base/values.h"
12
13 // One node of a forest to be serialized by SerializeDictionaryForest.
14 struct DictionaryForestNode {
15 DictionaryForestNode* parent;
16 base::DictionaryValue representation;
17 };
18
19 // A helper function taking a forest of Nodes and producing a ListValue
20 // representation. The representation contains a list of DictionaryValue for
21 // each root, and has DictionaryValues of children injected into a ListValue
22 // keyed |child_key| in the parent's DictionaryValue.
23 base::ListValue SerializeDictionaryForest(
24 std::vector<DictionaryForestNode> forest,
25 base::StringPiece child_key);
26
27 #endif // CHROME_BROWSER_DEVTOOLS_SERIALIZE_DICTIONARY_FOREST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698