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

Side by Side Diff: chrome/browser/chromeos/arc/arc_navigation_throttle.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
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_navigation_throttle.h" 5 #include "chrome/browser/chromeos/arc/arc_navigation_throttle.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } 241 }
242 242
243 show_intent_picker_callback_.Run( 243 show_intent_picker_callback_.Run(
244 navigation_handle()->GetWebContents(), app_info, 244 navigation_handle()->GetWebContents(), app_info,
245 base::Bind(&ArcNavigationThrottle::OnIntentPickerClosed, 245 base::Bind(&ArcNavigationThrottle::OnIntentPickerClosed,
246 weak_ptr_factory_.GetWeakPtr(), base::Passed(&handlers))); 246 weak_ptr_factory_.GetWeakPtr(), base::Passed(&handlers)));
247 } 247 }
248 248
249 void ArcNavigationThrottle::OnIntentPickerClosed( 249 void ArcNavigationThrottle::OnIntentPickerClosed(
250 mojo::Array<mojom::IntentHandlerInfoPtr> handlers, 250 mojo::Array<mojom::IntentHandlerInfoPtr> handlers,
251 std::string selected_app_package, 251 const std::string& selected_app_package,
252 CloseReason close_reason) { 252 CloseReason close_reason) {
253 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 253 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
254 const GURL& url = navigation_handle()->GetURL(); 254 const GURL& url = navigation_handle()->GetURL();
255 content::NavigationHandle* handle = navigation_handle(); 255 content::NavigationHandle* handle = navigation_handle();
256 previous_user_action_ = close_reason; 256 previous_user_action_ = close_reason;
257 257
258 // Make sure that the instance at least supports HandleUrl. 258 // Make sure that the instance at least supports HandleUrl.
259 auto* instance = ArcIntentHelperBridge::GetIntentHelperInstance( 259 auto* instance = ArcIntentHelperBridge::GetIntentHelperInstance(
260 "HandleUrl", kMinVersionForHandleUrl); 260 "HandleUrl", kMinVersionForHandleUrl);
261 size_t selected_app_index = handlers.size(); 261 size_t selected_app_index = handlers.size();
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 } 323 }
324 324
325 // static 325 // static
326 bool ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting( 326 bool ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting(
327 const GURL& previous_url, 327 const GURL& previous_url,
328 const GURL& current_url) { 328 const GURL& current_url) {
329 return ShouldOverrideUrlLoading(previous_url, current_url); 329 return ShouldOverrideUrlLoading(previous_url, current_url);
330 } 330 }
331 331
332 } // namespace arc 332 } // namespace arc
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/arc_navigation_throttle.h ('k') | chrome/browser/ui/browser_dialogs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698