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

Side by Side Diff: components/arc/intent_helper/local_activity_resolver.cc

Issue 2556463003: Use mojo typemaps to simplify arc::IntentFilter::IntentFilter() (reland) (Closed)
Patch Set: Rebased Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/arc/intent_helper/local_activity_resolver.h" 5 #include "components/arc/intent_helper/local_activity_resolver.h"
6 6
7 #include "url/gurl.h" 7 #include "url/gurl.h"
8 8
9 namespace arc { 9 namespace arc {
10 10
(...skipping 10 matching lines...) Expand all
21 for (const IntentFilter& filter : intent_filters_) { 21 for (const IntentFilter& filter : intent_filters_) {
22 if (filter.Match(url)) 22 if (filter.Match(url))
23 return false; 23 return false;
24 } 24 }
25 25
26 // Didn't find any matches for Android so let Chrome handle it. 26 // Didn't find any matches for Android so let Chrome handle it.
27 return true; 27 return true;
28 } 28 }
29 29
30 void LocalActivityResolver::UpdateIntentFilters( 30 void LocalActivityResolver::UpdateIntentFilters(
31 std::vector<mojom::IntentFilterPtr> mojo_intent_filters) { 31 std::vector<IntentFilter> intent_filters) {
32 intent_filters_.clear(); 32 intent_filters_ = std::move(intent_filters);
33 for (mojom::IntentFilterPtr& mojo_filter : mojo_intent_filters)
34 intent_filters_.emplace_back(mojo_filter);
35 } 33 }
36 34
37 } // namespace arc 35 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698