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

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

Issue 2679523002: Store target app name in Web Share prefs, and add extra logic. (Closed)
Patch Set: My nits Created 3 years, 10 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/webshare/share_target_pref_helper.h
diff --git a/chrome/browser/webshare/share_target_pref_helper.h b/chrome/browser/webshare/share_target_pref_helper.h
index 511564a22f90c99dfb32a66c98d30125335668bf..55ed0424d9a065e9bf5d30034aa15da7cb6430e8 100644
--- a/chrome/browser/webshare/share_target_pref_helper.h
+++ b/chrome/browser/webshare/share_target_pref_helper.h
@@ -7,15 +7,19 @@
#include "base/optional.h"
#include "base/strings/string_piece.h"
+#include "content/public/common/manifest.h"
+class GURL;
class PrefService;
-// Adds the Web Share target |share_target_origin| with template |url_template|
-// to |pref_service| under kWebShareVisitedTargets. If |url_template| is null,
-// this function will remove |share_target_origin| from kWebShareVisitedTargets,
-// if it is there.
-void UpdateShareTargetInPrefs(base::StringPiece manifest_url,
- base::Optional<std::string> url_template,
- PrefService* pref_service);
+// Adds the Web Share target defined by |manifest_url| to |pref_service| under
+// kWebShareVisitedTargets. It maps the key |manifest_url| to a dictionary that
+// contains a dictionary of the attributes of the share_target field, as well as
+// the name field in |manifest|. If the |manifest| doesn't contain a
+// share_target field, or it does but there is no url_template field, this will
+// remove |manifest_url| from kWebShareVisitedTargets, if it is there.
+void UpdateShareTargetInPrefs(const GURL& manifest_url,
+ const content::Manifest& manifest,
+ PrefService* pref_service);
#endif // CHROME_BROWSER_WEBSHARE_SHARE_TARGET_PREF_HELPER_H_

Powered by Google App Engine
This is Rietveld 408576698