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

Unified Diff: chrome/browser/webshare/share_service_impl.h

Issue 2564483003: Default share to Share Target: Partial impl. of Web Share for Desktop. (Closed)
Patch Set: Check the target_url opened by Share, in test Created 4 years 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/webshare/share_service_impl.h
diff --git a/chrome/browser/webshare/share_service_impl.h b/chrome/browser/webshare/share_service_impl.h
index 83de10f9511ff36394283b8f200f331ae0dad769..ad08806bd39f0952809ca0889337e371ba57063c 100644
--- a/chrome/browser/webshare/share_service_impl.h
+++ b/chrome/browser/webshare/share_service_impl.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/gtest_prod_util.h"
#include "mojo/public/cpp/bindings/interface_request.h"
#include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h"
@@ -22,10 +23,23 @@ class ShareServiceImpl : public blink::mojom::ShareService {
void Share(const std::string& title,
Matt Giuca 2016/12/21 07:13:49 Add a comment: // ShareService overrides: (By con
constantina 2017/01/04 07:01:44 Done. The following example I found had the full n
const std::string& text,
- const GURL& url,
+ const GURL& share_url,
Matt Giuca 2016/12/21 07:13:49 Why not just |url|?
constantina 2017/01/04 07:01:45 The implementation references lots of different ty
Matt Giuca 2017/01/05 03:09:24 Right, makes sense. But you should not change the
const ShareCallback& callback) override;
+ virtual void openTargetURL(GURL target_url);
Matt Giuca 2016/12/21 07:13:49 nit: Names should start with a capital letter. Th
constantina 2017/01/04 07:01:44 Done.
+
private:
+ FRIEND_TEST_ALL_PREFIXES(ShareServiceImplUnittest, ReplacePlaceholders);
Matt Giuca 2016/12/21 07:13:49 👍
constantina 2017/01/04 07:01:44 👍
+ FRIEND_TEST_ALL_PREFIXES(ShareServiceImplUnittest,
+ ReplacePlaceholdersInQuery);
+
+ // Replaces all instances of "%{title}", "%{text}", and "%{url}" (quotes for
+ // clarity) in |url_template| with |title|, |text|, and |url| respectively.
+ static std::string replacePlaceholders(const std::string url_template,
Sam McNally 2016/12/22 07:03:50 ReplacePlaceholders base::StringPiece
constantina 2017/01/04 07:01:45 Changed Capitalisation. Did you want me to change
+ const std::string title,
+ const std::string text,
+ const GURL& share_url);
+
DISALLOW_COPY_AND_ASSIGN(ShareServiceImpl);
};
« no previous file with comments | « no previous file | chrome/browser/webshare/share_service_impl.cc » ('j') | chrome/browser/webshare/share_service_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698