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

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

Issue 2368673002: arc: Rename UrlHandlerInfo to IntentHandlerInfo. (Closed)
Patch Set: Created 4 years, 3 months 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
« no previous file with comments | « components/arc/intent_helper/link_handler_model_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/link_handler_model_impl.h" 5 #include "components/arc/intent_helper/link_handler_model_impl.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 if (!intent_helper_instance) 83 if (!intent_helper_instance)
84 return; 84 return;
85 if (handler_id >= handlers_.size()) 85 if (handler_id >= handlers_.size())
86 return; 86 return;
87 const GURL rewritten(RewriteUrlFromQueryIfAvailable(url)); 87 const GURL rewritten(RewriteUrlFromQueryIfAvailable(url));
88 intent_helper_instance->HandleUrl(rewritten.spec(), 88 intent_helper_instance->HandleUrl(rewritten.spec(),
89 handlers_[handler_id]->package_name); 89 handlers_[handler_id]->package_name);
90 } 90 }
91 91
92 void LinkHandlerModelImpl::OnUrlHandlerList( 92 void LinkHandlerModelImpl::OnUrlHandlerList(
93 mojo::Array<mojom::UrlHandlerInfoPtr> handlers) { 93 mojo::Array<mojom::IntentHandlerInfoPtr> handlers) {
94 handlers_ = ArcIntentHelperBridge::FilterOutIntentHelper(std::move(handlers)); 94 handlers_ = ArcIntentHelperBridge::FilterOutIntentHelper(std::move(handlers));
95 95
96 bool icon_info_notified = false; 96 bool icon_info_notified = false;
97 if (icon_loader_) { 97 if (icon_loader_) {
98 std::vector<ActivityIconLoader::ActivityName> activities; 98 std::vector<ActivityIconLoader::ActivityName> activities;
99 for (size_t i = 0; i < handlers_.size(); ++i) { 99 for (size_t i = 0; i < handlers_.size(); ++i) {
100 activities.emplace_back(handlers_[i]->package_name, 100 activities.emplace_back(handlers_[i]->package_name,
101 handlers_[i]->activity_name); 101 handlers_[i]->activity_name);
102 } 102 }
103 const ActivityIconLoader::GetResult result = icon_loader_->GetActivityIcons( 103 const ActivityIconLoader::GetResult result = icon_loader_->GetActivityIcons(
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 if (!GetQueryValue(url, kKeyToFind, &value)) 158 if (!GetQueryValue(url, kKeyToFind, &value))
159 return url; 159 return url;
160 160
161 const GURL new_url(value); 161 const GURL new_url(value);
162 if (!new_url.is_valid()) 162 if (!new_url.is_valid())
163 return url; 163 return url;
164 return new_url; 164 return new_url;
165 } 165 }
166 166
167 } // namespace arc 167 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/intent_helper/link_handler_model_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698