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

Side by Side Diff: chrome/browser/chromeos/arc/arc_external_protocol_dialog.cc

Issue 2447773003: Use a const reference in IntentPickerResponse (Closed)
Patch Set: fix tests 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_navigation_throttle.h » ('j') | 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 "chrome/browser/chromeos/arc/arc_external_protocol_dialog.h" 5 #include "chrome/browser/chromeos/arc/arc_external_protocol_dialog.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 tab_util::GetWebContentsByID(render_process_host_id, routing_id); 63 tab_util::GetWebContentsByID(render_process_host_id, routing_id);
64 if (web_contents && web_contents->GetController().IsInitialNavigation()) 64 if (web_contents && web_contents->GetController().IsInitialNavigation())
65 web_contents->Close(); 65 web_contents->Close();
66 } 66 }
67 67
68 // Called when the dialog is closed. 68 // Called when the dialog is closed.
69 void OnIntentPickerClosed(int render_process_host_id, 69 void OnIntentPickerClosed(int render_process_host_id,
70 int routing_id, 70 int routing_id,
71 const GURL& url, 71 const GURL& url,
72 mojo::Array<mojom::IntentHandlerInfoPtr> handlers, 72 mojo::Array<mojom::IntentHandlerInfoPtr> handlers,
73 std::string selected_app_package, 73 const std::string& selected_app_package,
74 ArcNavigationThrottle::CloseReason close_reason) { 74 ArcNavigationThrottle::CloseReason close_reason) {
75 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 75 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
76 76
77 size_t selected_app_index = handlers.size(); 77 size_t selected_app_index = handlers.size();
78 // Make sure that the instance at least supports HandleUrl. 78 // Make sure that the instance at least supports HandleUrl.
79 auto* instance = ArcIntentHelperBridge::GetIntentHelperInstance( 79 auto* instance = ArcIntentHelperBridge::GetIntentHelperInstance(
80 "HandleUrl", kMinVersionForHandleUrl); 80 "HandleUrl", kMinVersionForHandleUrl);
81 if (!instance) { 81 if (!instance) {
82 close_reason = ArcNavigationThrottle::CloseReason::ERROR; 82 close_reason = ArcNavigationThrottle::CloseReason::ERROR;
83 } else if (close_reason == 83 } else if (close_reason ==
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 229
230 // Show ARC version of the dialog, which is IntentPickerBubbleView. To show 230 // Show ARC version of the dialog, which is IntentPickerBubbleView. To show
231 // the bubble view, we need to ask ARC for a handler list first. 231 // the bubble view, we need to ask ARC for a handler list first.
232 instance->RequestUrlHandlerList( 232 instance->RequestUrlHandlerList(
233 url.spec(), 233 url.spec(),
234 base::Bind(OnUrlHandlerList, render_process_host_id, routing_id, url)); 234 base::Bind(OnUrlHandlerList, render_process_host_id, routing_id, url));
235 return true; 235 return true;
236 } 236 }
237 237
238 } // namespace arc 238 } // namespace arc
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_navigation_throttle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698