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

Unified Diff: chrome/browser/chromeos/arc/arc_navigation_throttle.h

Issue 2447773003: Use a const reference in IntentPickerResponse (Closed)
Patch Set: fix tests Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/arc/arc_navigation_throttle.h
diff --git a/chrome/browser/chromeos/arc/arc_navigation_throttle.h b/chrome/browser/chromeos/arc/arc_navigation_throttle.h
index 18be29a51e610dde611914d4536bbae3b2aa11d1..d60932be7701933f37c6ad22ee1b59c4d3c899e6 100644
--- a/chrome/browser/chromeos/arc/arc_navigation_throttle.h
+++ b/chrome/browser/chromeos/arc/arc_navigation_throttle.h
@@ -48,7 +48,7 @@ class ArcNavigationThrottle : public content::NavigationThrottle {
enum { kMaxAppResults = 3 };
struct AppInfo {
- explicit AppInfo(gfx::Image img, std::string package, std::string activity)
+ AppInfo(gfx::Image img, std::string package, std::string activity)
: icon(img), package_name(package), activity_name(activity) {}
gfx::Image icon;
std::string package_name;
@@ -58,7 +58,7 @@ class ArcNavigationThrottle : public content::NavigationThrottle {
using ShowIntentPickerCallback = base::Callback<void(
content::WebContents* web_contents,
const std::vector<AppInfo>& app_info,
- const base::Callback<void(std::string, CloseReason)>& cb)>;
+ const base::Callback<void(const std::string&, CloseReason)>& cb)>;
ArcNavigationThrottle(content::NavigationHandle* navigation_handle,
const ShowIntentPickerCallback& show_intent_picker_cb);
~ArcNavigationThrottle() override;
@@ -78,7 +78,7 @@ class ArcNavigationThrottle : public content::NavigationThrottle {
mojo::Array<mojom::IntentHandlerInfoPtr> handlers,
std::unique_ptr<ActivityIconLoader::ActivityToIconsMap> icons);
void OnIntentPickerClosed(mojo::Array<mojom::IntentHandlerInfoPtr> handlers,
- std::string selected_app_package,
+ const std::string& selected_app_package,
CloseReason close_reason);
// A callback object that allow us to display an IntentPicker when Run() is
// executed, it also allow us to report the user's selection back to
« no previous file with comments | « chrome/browser/chromeos/arc/arc_external_protocol_dialog.cc ('k') | chrome/browser/chromeos/arc/arc_navigation_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698