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

Unified Diff: tools/battor_agent/battor_finder.cc

Issue 2492013005: Mojo C++ bindings: switch device/serial mojom target to use STL types. (Closed)
Patch Set: \ Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/browser/api/serial/serial_api.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/battor_agent/battor_finder.cc
diff --git a/tools/battor_agent/battor_finder.cc b/tools/battor_agent/battor_finder.cc
index 0aa54ac12b3b87aaa6fbdff7e757c750e965f963..6137c3b79ff5e73b5ca54429734a71c8f98057b0 100644
--- a/tools/battor_agent/battor_finder.cc
+++ b/tools/battor_agent/battor_finder.cc
@@ -38,7 +38,9 @@ std::string BattOrFinder::FindBattOr() {
// If we have no switch-specified path, look for a device with the right
// display name.
for (size_t i = 0; i < devices.size(); i++) {
- std::string display_name = devices[i]->display_name.get();
+ if (!devices[i]->display_name)
+ continue;
+ const auto& display_name = devices[i]->display_name.value();
if (display_name.find(kBattOrDisplayNamePrefix) != std::string::npos) {
LOG(INFO) << "Found BattOr with display name " << display_name
<< " at path " << devices[i]->path;
« no previous file with comments | « extensions/browser/api/serial/serial_api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698