OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <sstream> | 9 #include <sstream> |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 OutputString(indent); | 49 OutputString(indent); |
50 OutputString(bool_value ? "true" : "false"); | 50 OutputString(bool_value ? "true" : "false"); |
51 OutputString("\n"); | 51 OutputString("\n"); |
52 } else if (value->GetAsDictionary(&dict_value)) { | 52 } else if (value->GetAsDictionary(&dict_value)) { |
53 base::DictionaryValue::Iterator iter(*dict_value); | 53 base::DictionaryValue::Iterator iter(*dict_value); |
54 while (!iter.IsAtEnd()) { | 54 while (!iter.IsAtEnd()) { |
55 OutputString(indent + iter.key() + "\n"); | 55 OutputString(indent + iter.key() + "\n"); |
56 PrintValue(&iter.value(), indentLevel + 1); | 56 PrintValue(&iter.value(), indentLevel + 1); |
57 iter.Advance(); | 57 iter.Advance(); |
58 } | 58 } |
59 } else if (value->IsType(base::Value::TYPE_NULL)) { | 59 } else if (value->IsType(base::Value::Type::NONE)) { |
60 OutputString(indent + "<null>\n"); | 60 OutputString(indent + "<null>\n"); |
61 } | 61 } |
62 } | 62 } |
63 | 63 |
64 // Default handler for property | 64 // Default handler for property |
65 void DefaultHandler(const std::string& name, const base::Value* value) { | 65 void DefaultHandler(const std::string& name, const base::Value* value) { |
66 OutputString("\n"); | 66 OutputString("\n"); |
67 OutputString(name); | 67 OutputString(name); |
68 OutputString("\n"); | 68 OutputString("\n"); |
69 PrintValue(value, 1); | 69 PrintValue(value, 1); |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 | 500 |
501 if (!PrintConfig(config, what_to_print, !multiple_outputs)) | 501 if (!PrintConfig(config, what_to_print, !multiple_outputs)) |
502 return 1; | 502 return 1; |
503 } | 503 } |
504 } | 504 } |
505 | 505 |
506 return 0; | 506 return 0; |
507 } | 507 } |
508 | 508 |
509 } // namespace commands | 509 } // namespace commands |
OLD | NEW |