OLD | NEW |
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 Loading... |
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 |
OLD | NEW |