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

Side by Side Diff: tools/gn/command_desc.cc

Issue 2539363004: Make base::Value::TYPE a scoped enum. (Closed)
Patch Set: Rebase Created 4 years 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 | « third_party/libaddressinput/chromium/json.cc ('k') | tools/ipc_fuzzer/fuzzer/fuzzer.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) 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
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
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
OLDNEW
« no previous file with comments | « third_party/libaddressinput/chromium/json.cc ('k') | tools/ipc_fuzzer/fuzzer/fuzzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698