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

Unified Diff: components/arc/intent_helper/intent_filter_unittest.cc

Issue 2498223002: arc: enable use_new_wrapper_types for intent_helper.mojom (Closed)
Patch Set: rebase 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
Index: components/arc/intent_helper/intent_filter_unittest.cc
diff --git a/components/arc/intent_helper/intent_filter_unittest.cc b/components/arc/intent_helper/intent_filter_unittest.cc
index 2b8de2a325b6094e4a6147c34e708f38ea5eb237..10881fae85f93fd1aa2fbb40f37bd5e15e1ccd70 100644
--- a/components/arc/intent_helper/intent_filter_unittest.cc
+++ b/components/arc/intent_helper/intent_filter_unittest.cc
@@ -32,7 +32,9 @@ class IntentFilterBuilder {
mojom::AuthorityEntryPtr ae = mojom::AuthorityEntry::New();
ae->host = host;
ae->port = port;
- filter_spec_->data_authorities.push_back(std::move(ae));
+ if (!filter_spec_->data_authorities.has_value())
+ filter_spec_->data_authorities = std::vector<mojom::AuthorityEntryPtr>();
+ filter_spec_->data_authorities->push_back(std::move(ae));
return *this;
}
@@ -41,7 +43,9 @@ class IntentFilterBuilder {
mojom::PatternMatcherPtr p = mojom::PatternMatcher::New();
p->pattern = path;
p->type = type;
- filter_spec_->data_paths.push_back(std::move(p));
+ if (!filter_spec_->data_paths.has_value())
+ filter_spec_->data_paths = std::vector<mojom::PatternMatcherPtr>();
+ filter_spec_->data_paths->push_back(std::move(p));
return *this;
}
« no previous file with comments | « components/arc/intent_helper/intent_filter.cc ('k') | components/arc/intent_helper/link_handler_model_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698