| Index: blimp/common/logging.cc
|
| diff --git a/blimp/common/logging.cc b/blimp/common/logging.cc
|
| index 6f5587b20843d6e1e5ebb98c77a8b7b944421679..b8e4438201c178099cc8f7dbbb9ed0dde7a29e60 100644
|
| --- a/blimp/common/logging.cc
|
| +++ b/blimp/common/logging.cc
|
| @@ -257,37 +257,37 @@ class NullLogExtractor : public LogExtractor {
|
| } // namespace
|
|
|
| BlimpMessageLogger::BlimpMessageLogger() {
|
| - AddHandler("COMPOSITOR", BlimpMessage::COMPOSITOR,
|
| + AddHandler("COMPOSITOR", BlimpMessage::kCompositor,
|
| base::WrapUnique(new CompositorLogExtractor));
|
| - AddHandler("INPUT", BlimpMessage::INPUT,
|
| + AddHandler("INPUT", BlimpMessage::kInput,
|
| base::WrapUnique(new InputLogExtractor));
|
| - AddHandler("NAVIGATION", BlimpMessage::NAVIGATION,
|
| + AddHandler("NAVIGATION", BlimpMessage::kNavigation,
|
| base::WrapUnique(new NavigationLogExtractor));
|
| - AddHandler("PROTOCOL_CONTROL", BlimpMessage::PROTOCOL_CONTROL,
|
| + AddHandler("PROTOCOL_CONTROL", BlimpMessage::kProtocolControl,
|
| base::WrapUnique(new ProtocolControlLogExtractor));
|
| - AddHandler("RENDER_WIDGET", BlimpMessage::RENDER_WIDGET,
|
| + AddHandler("RENDER_WIDGET", BlimpMessage::kRenderWidget,
|
| base::WrapUnique(new RenderWidgetLogExtractor));
|
| - AddHandler("SETTINGS", BlimpMessage::SETTINGS,
|
| + AddHandler("SETTINGS", BlimpMessage::kSettings,
|
| base::WrapUnique(new SettingsLogExtractor));
|
| - AddHandler("TAB_CONTROL", BlimpMessage::TAB_CONTROL,
|
| + AddHandler("TAB_CONTROL", BlimpMessage::kTabControl,
|
| base::WrapUnique(new TabControlLogExtractor));
|
| }
|
|
|
| BlimpMessageLogger::~BlimpMessageLogger() {}
|
|
|
| -void BlimpMessageLogger::AddHandler(const std::string& type_name,
|
| - BlimpMessage::Type type,
|
| +void BlimpMessageLogger::AddHandler(const std::string& feature_name,
|
| + BlimpMessage::FeatureCase feature_case,
|
| std::unique_ptr<LogExtractor> extractor) {
|
| - DCHECK(extractors_.find(type) == extractors_.end());
|
| - DCHECK(!type_name.empty());
|
| - extractors_[type] = make_pair(type_name, std::move(extractor));
|
| + DCHECK(extractors_.find(feature_case) == extractors_.end());
|
| + DCHECK(!feature_name.empty());
|
| + extractors_[feature_case] = make_pair(feature_name, std::move(extractor));
|
| }
|
|
|
| void BlimpMessageLogger::LogMessageToStream(const BlimpMessage& message,
|
| std::ostream* out) const {
|
| LogFields fields;
|
|
|
| - auto extractor = extractors_.find(message.type());
|
| + auto extractor = extractors_.find(message.feature_case());
|
| if (extractor != extractors_.end()) {
|
| // An extractor is registered for |message|.
|
| // Add the human-readable name of |message.type|.
|
| @@ -296,7 +296,7 @@ void BlimpMessageLogger::LogMessageToStream(const BlimpMessage& message,
|
| } else {
|
| // Don't know the human-readable name of |message.type|.
|
| // Just represent it using its numeric form instead.
|
| - AddField("type", message.type(), &fields);
|
| + AddField("type", message.feature_case(), &fields);
|
| }
|
|
|
| // Append "target_tab_id" (if present) and "byte_size" to the field set.
|
|
|