webshare-target: Introduce ShareTarget class

1. Introduces a move-only ShareTarget class.
2. Refactor ShareServiceImpl to use ShareTarget.
  3.1. Pass a ShareTarget vector to ShowPicker.
  3.2. Modify picker's callback to return a ShareTarget. ShareTarget includes
       the URL template so we avoid an extra dictionary lookup when it returns.
4. Fix tests.
  4.1. Add PickTarget function to ShareServiceImplUnittest that picks a target
       based on the URL.

Bug: 716957, 717323

Change-Id: If28d0a7576644f1501afdf9441c2f8845d9935d6
Reviewed-on: https://chromium-review.googlesource.com/517614
Commit-Queue: Giovanni Ortuño Urquidi <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Reviewed-by: Matt Giuca <[email protected]>
Cr-Commit-Position: refs/heads/master@{#479961}
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 53c8e206..a69b5e8 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -1425,6 +1425,8 @@
     "web_data_service_factory.h",
     "webshare/share_target_pref_helper.cc",
     "webshare/share_target_pref_helper.h",
+    "webshare/webshare_target.cc",
+    "webshare/webshare_target.h",
     "win/app_icon.cc",
     "win/app_icon.h",
     "win/browser_util.cc",