From 5120f6dcd75196b5079c8fdae2ef171688b82836 Mon Sep 17 00:00:00 2001 From: lizeb Date: Fri, 19 Feb 2016 01:29:44 -0800 Subject: Android: Add support for android-app scheme in a referrer. Following android's documentation, native apps can set a referrer with the format android-app://com.foo.bar. This is supported by the Java side, but not the native code. TBR=alokp@chromium.org,asargent@chromium.org # Adding a parameter in chromecast/ and extensions/ TESTED=adb shell am start -n com.google.android.apps.chrome/.Main -a "android.intent.action.VIEW" -d 'http://www.whatismyreferer.com/' --eu "android.intent.extra.REFERRER" "android-app://com.foo.bar" BUG=537863 Review URL: https://codereview.chromium.org/1416863004 Cr-Commit-Position: refs/heads/master@{#376423} --- extensions/shell/common/shell_content_client.cc | 1 + extensions/shell/common/shell_content_client.h | 1 + 2 files changed, 2 insertions(+) (limited to 'extensions/shell') diff --git a/extensions/shell/common/shell_content_client.cc b/extensions/shell/common/shell_content_client.cc index 946fe83..e180da8 100644 --- a/extensions/shell/common/shell_content_client.cc +++ b/extensions/shell/common/shell_content_client.cc @@ -83,6 +83,7 @@ static const url::SchemeWithType kShellStandardURLSchemes[ void ShellContentClient::AddAdditionalSchemes( std::vector* standard_schemes, + std::vector* referrer_schemes, std::vector* savable_schemes) { for (int i = 0; i < kNumShellStandardURLSchemes; i++) standard_schemes->push_back(kShellStandardURLSchemes[i]); diff --git a/extensions/shell/common/shell_content_client.h b/extensions/shell/common/shell_content_client.h index f105511..471272a 100644 --- a/extensions/shell/common/shell_content_client.h +++ b/extensions/shell/common/shell_content_client.h @@ -20,6 +20,7 @@ class ShellContentClient : public content::ContentClient { void AddPepperPlugins( std::vector* plugins) override; void AddAdditionalSchemes(std::vector* standard_schemes, + std::vector* referrer_schemes, std::vector* saveable_shemes) override; std::string GetUserAgent() const override; base::string16 GetLocalizedString(int message_id) const override; -- cgit v1.1