Skip to content

Commit

Permalink
fix macOS build
Browse files Browse the repository at this point in the history
  • Loading branch information
Youw committed Jul 9, 2018
1 parent a937c48 commit b34479b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions handler/handler_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ bool AddKeyValueToMap(std::map<std::string, std::string>* map,
}
return true;
}

#if defined(OS_WIN) || defined(OS_FUCHSIA)
// Overloaded version, to accept base::FilePath as a VALUE.
bool AddKeyValueToMap(std::map<std::string, base::FilePath>* map,
const std::string& key_value,
Expand All @@ -233,7 +233,7 @@ bool AddKeyValueToMap(std::map<std::string, base::FilePath>* map,
}
return true;
}

#endif
// Calls Metrics::HandlerLifetimeMilestone, but only on the first call. This is
// to prevent multiple exit events from inadvertently being recorded, which
// might happen if a crash occurs during destruction in what would otherwise be
Expand Down Expand Up @@ -772,12 +772,14 @@ int HandlerMain(int argc,
options.url = optarg;
break;
}
#if defined(OS_WIN) || defined(OS_FUCHSIA)
case kOptionAttachment: {
if (!AddKeyValueToMap(&options.attachments, optarg, "--attachment")) {
return ExitFailure();
}
break;
}
#endif
case kOptionHelp: {
Usage(me);
MetricsRecordExit(Metrics::LifetimeMilestone::kExitedEarly);
Expand Down

0 comments on commit b34479b

Please sign in to comment.