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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 if (value->GetAsString(&string_value)) { | 78 if (value->GetAsString(&string_value)) { |
79 OutputString(name + ": ", DECORATION_YELLOW); | 79 OutputString(name + ": ", DECORATION_YELLOW); |
80 OutputString(string_value + "\n"); | 80 OutputString(string_value + "\n"); |
81 } | 81 } |
82 } | 82 } |
83 | 83 |
84 void VisibilityHandler(const std::string& name, const base::Value* value) { | 84 void VisibilityHandler(const std::string& name, const base::Value* value) { |
85 const base::ListValue* list; | 85 const base::ListValue* list; |
86 if (value->GetAsList(&list)) { | 86 if (value->GetAsList(&list)) { |
87 if (list->empty()) { | 87 if (list->empty()) { |
88 base::StringValue str("(no visibility)"); | 88 base::Value str("(no visibility)"); |
89 DefaultHandler(name, &str); | 89 DefaultHandler(name, &str); |
90 } else { | 90 } else { |
91 DefaultHandler(name, value); | 91 DefaultHandler(name, value); |
92 } | 92 } |
93 } | 93 } |
94 } | 94 } |
95 | 95 |
96 void PublicHandler(const std::string& name, const base::Value* value) { | 96 void PublicHandler(const std::string& name, const base::Value* value) { |
97 std::string p; | 97 std::string p; |
98 if (value->GetAsString(&p)) { | 98 if (value->GetAsString(&p)) { |
99 if (p == "*") { | 99 if (p == "*") { |
100 base::StringValue str("[All headers listed in the sources are public.]"); | 100 base::Value str("[All headers listed in the sources are public.]"); |
101 DefaultHandler(name, &str); | 101 DefaultHandler(name, &str); |
102 return; | 102 return; |
103 } | 103 } |
104 } | 104 } |
105 DefaultHandler(name, value); | 105 DefaultHandler(name, value); |
106 } | 106 } |
107 | 107 |
108 void ConfigsHandler(const std::string& name, const base::Value* value) { | 108 void ConfigsHandler(const std::string& name, const base::Value* value) { |
109 bool tree = base::CommandLine::ForCurrentProcess()->HasSwitch(kTree); | 109 bool tree = base::CommandLine::ForCurrentProcess()->HasSwitch(kTree); |
110 if (tree) | 110 if (tree) |
(...skipping 389 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 |