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

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..e51ae712307f2407e129c075bb51022f0e479e34 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;
+ auto& display_name = devices[i]->display_name.value();
scottmg 2016/11/14 17:22:48 Sorry, I couldn't figure out what type display_nam
yzshen1 2016/11/14 17:27:55 Its type is now base::Optional<std::string>. Cha
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