mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
extra/chromium to 31.0.1650.48-1
This commit is contained in:
parent
0f3aa7dcd8
commit
5064acbb06
3 changed files with 304 additions and 4 deletions
|
@ -21,14 +21,14 @@ buildarch=20
|
||||||
highmem=1
|
highmem=1
|
||||||
|
|
||||||
pkgname=chromium
|
pkgname=chromium
|
||||||
pkgver=30.0.1599.114
|
pkgver=31.0.1650.48
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="The open-source project behind Google Chrome, an attempt at creating a safer, faster, and more stable browser"
|
pkgdesc="The open-source project behind Google Chrome, an attempt at creating a safer, faster, and more stable browser"
|
||||||
arch=('armv6h' 'armv7h')
|
arch=('armv6h' 'armv7h')
|
||||||
url="http://www.chromium.org/"
|
url="http://www.chromium.org/"
|
||||||
license=('BSD')
|
license=('BSD')
|
||||||
depends=('gtk2' 'nss' 'alsa-lib' 'xdg-utils' 'bzip2' 'libevent' 'libxss' 'icu'
|
depends=('gtk2' 'nss' 'alsa-lib' 'xdg-utils' 'bzip2' 'libevent' 'libxss' 'icu'
|
||||||
'libgcrypt' 'ttf-font' 'udev' 'dbus' 'flac' 'opus' 'libwebp' 'snappy'
|
'libgcrypt' 'ttf-font' 'udev' 'dbus' 'flac' 'opus' 'snappy'
|
||||||
'speech-dispatcher' 'pciutils' 'libpulse' 'harfbuzz' 'harfbuzz-icu'
|
'speech-dispatcher' 'pciutils' 'libpulse' 'harfbuzz' 'harfbuzz-icu'
|
||||||
'desktop-file-utils' 'hicolor-icon-theme')
|
'desktop-file-utils' 'hicolor-icon-theme')
|
||||||
makedepends=('python2' 'perl' 'gperf' 'yasm' 'mesa' 'libgnome-keyring'
|
makedepends=('python2' 'perl' 'gperf' 'yasm' 'mesa' 'libgnome-keyring'
|
||||||
|
@ -43,14 +43,18 @@ source=(https://gsdview.appspot.com/chromium-browser-official/$pkgname-$pkgver.t
|
||||||
chromium.desktop
|
chromium.desktop
|
||||||
chromium.default
|
chromium.default
|
||||||
chromium.sh
|
chromium.sh
|
||||||
|
chromium-31.0.1650.48-NPN_URLRedirectResponse.patch
|
||||||
|
chromium-31.0.1650.48-NPAPI-cookies.patch
|
||||||
chromium-system-icu-r0.patch
|
chromium-system-icu-r0.patch
|
||||||
arm-webrtc-fix.patch
|
arm-webrtc-fix.patch
|
||||||
skia.patch
|
skia.patch
|
||||||
v6-ffmpeg.patch)
|
v6-ffmpeg.patch)
|
||||||
sha256sums=('82ff2b54cb6fa9f314098e9905e79d578d97940bab05111a3c0c782217c2b760'
|
sha256sums=('3e478b5b85a023b3bba55b23d71cd6f585a08f865f7a98297a9a0757e9695c5d'
|
||||||
'09bfac44104f4ccda4c228053f689c947b3e97da9a4ab6fa34ce061ee83d0322'
|
'09bfac44104f4ccda4c228053f689c947b3e97da9a4ab6fa34ce061ee83d0322'
|
||||||
'478340d5760a9bd6c549e19b1b5d1c5b4933ebf5f8cfb2b3e2d70d07443fe232'
|
'478340d5760a9bd6c549e19b1b5d1c5b4933ebf5f8cfb2b3e2d70d07443fe232'
|
||||||
'4999fded897af692f4974f0a3e3bbb215193519918a1fa9b31ed51e74a2dccb9'
|
'4999fded897af692f4974f0a3e3bbb215193519918a1fa9b31ed51e74a2dccb9'
|
||||||
|
'c2e56730e0cf962d762d18abf8488e1b19b4688ce39d22dd74c47dba7996319b'
|
||||||
|
'b24f58147333eb29f762aec58742db74825b587def3d6daf16c8cd315ce6ccff'
|
||||||
'9bf164094ff33565f79807ab17cbd1d3f75655383fdaa01bb1a702263174cf09'
|
'9bf164094ff33565f79807ab17cbd1d3f75655383fdaa01bb1a702263174cf09'
|
||||||
'222ec0db5d40b02e4ebbde8a1f1c5de3f0579e51836be87be138c44f8487d0ce'
|
'222ec0db5d40b02e4ebbde8a1f1c5de3f0579e51836be87be138c44f8487d0ce'
|
||||||
'77668a94924c6bce6c48ca78c5cb778c6728bb687b66334b7164d7301a267939'
|
'77668a94924c6bce6c48ca78c5cb778c6728bb687b66334b7164d7301a267939'
|
||||||
|
@ -77,6 +81,14 @@ prepare() {
|
||||||
# Temp fix for skia
|
# Temp fix for skia
|
||||||
patch -Np0 -i "$srcdir/skia.patch"
|
patch -Np0 -i "$srcdir/skia.patch"
|
||||||
|
|
||||||
|
# Black screen is displayed when playing a video with NPAPI plugin
|
||||||
|
# http://code.google.com/p/chromium/issues/detail?id=301510
|
||||||
|
patch -Np0 -i "$srcdir/chromium-31.0.1650.48-NPN_URLRedirectResponse.patch"
|
||||||
|
|
||||||
|
# Cookies not being sent with plugin requests
|
||||||
|
# http://code.google.com/p/chromium/issues/detail?id=316511
|
||||||
|
patch -Np0 -i "$srcdir/chromium-31.0.1650.48-NPAPI-cookies.patch"
|
||||||
|
|
||||||
# Fix build with system ICU (patch from Gentoo)
|
# Fix build with system ICU (patch from Gentoo)
|
||||||
patch -Np0 -i "$srcdir/chromium-system-icu-r0.patch"
|
patch -Np0 -i "$srcdir/chromium-system-icu-r0.patch"
|
||||||
|
|
||||||
|
@ -142,7 +154,6 @@ fi
|
||||||
-Duse_system_libevent=1
|
-Duse_system_libevent=1
|
||||||
-Duse_system_libjpeg=1
|
-Duse_system_libjpeg=1
|
||||||
-Duse_system_libpng=1
|
-Duse_system_libpng=1
|
||||||
-Duse_system_libwebp=1
|
|
||||||
-Duse_system_libxml=0
|
-Duse_system_libxml=0
|
||||||
-Duse_system_opus=1
|
-Duse_system_opus=1
|
||||||
-Duse_system_snappy=1
|
-Duse_system_snappy=1
|
||||||
|
|
276
extra/chromium/chromium-31.0.1650.48-NPAPI-cookies.patch
Normal file
276
extra/chromium/chromium-31.0.1650.48-NPAPI-cookies.patch
Normal file
|
@ -0,0 +1,276 @@
|
||||||
|
Index: content/browser/child_process_security_policy_impl.cc
|
||||||
|
===================================================================
|
||||||
|
--- content/browser/child_process_security_policy_impl.cc (revision 233522)
|
||||||
|
+++ content/browser/child_process_security_policy_impl.cc (working copy)
|
||||||
|
@@ -793,7 +793,7 @@
|
||||||
|
bool ChildProcessSecurityPolicyImpl::CanSendCookiesForOrigin(int child_id,
|
||||||
|
const GURL& gurl) {
|
||||||
|
for (PluginProcessHostIterator iter; !iter.Done(); ++iter) {
|
||||||
|
- if (iter.GetData().process_type == child_id) {
|
||||||
|
+ if (iter.GetData().id == child_id) {
|
||||||
|
if (iter.GetData().process_type == PROCESS_TYPE_PLUGIN) {
|
||||||
|
// NPAPI plugin processes are unsandboxed and so are trusted. Plugins
|
||||||
|
// can make request to any origin.
|
||||||
|
Index: content/browser/plugin_browsertest.cc
|
||||||
|
===================================================================
|
||||||
|
--- content/browser/plugin_browsertest.cc (revision 233522)
|
||||||
|
+++ content/browser/plugin_browsertest.cc (working copy)
|
||||||
|
@@ -5,15 +5,21 @@
|
||||||
|
#include "base/command_line.h"
|
||||||
|
#include "base/file_util.h"
|
||||||
|
#include "base/path_service.h"
|
||||||
|
+#include "base/strings/string_util.h"
|
||||||
|
#include "base/strings/utf_string_conversions.h"
|
||||||
|
+#include "content/browser/loader/resource_dispatcher_host_impl.h"
|
||||||
|
#include "content/public/browser/browser_thread.h"
|
||||||
|
+#include "content/public/browser/resource_dispatcher_host_delegate.h"
|
||||||
|
#include "content/public/common/content_switches.h"
|
||||||
|
#include "content/public/test/browser_test_utils.h"
|
||||||
|
+#include "content/public/test/test_utils.h"
|
||||||
|
#include "content/shell/browser/shell.h"
|
||||||
|
#include "content/shell/common/shell_switches.h"
|
||||||
|
#include "content/test/content_browser_test.h"
|
||||||
|
#include "content/test/content_browser_test_utils.h"
|
||||||
|
#include "content/test/net/url_request_mock_http_job.h"
|
||||||
|
+#include "net/test/embedded_test_server/embedded_test_server.h"
|
||||||
|
+#include "net/url_request/url_request.h"
|
||||||
|
#include "ui/gfx/rect.h"
|
||||||
|
|
||||||
|
#if defined(OS_WIN)
|
||||||
|
@@ -468,4 +474,77 @@
|
||||||
|
}
|
||||||
|
#endif // defined(OS_WIN)
|
||||||
|
|
||||||
|
+class TestResourceDispatcherHostDelegate
|
||||||
|
+ : public ResourceDispatcherHostDelegate {
|
||||||
|
+ public:
|
||||||
|
+ TestResourceDispatcherHostDelegate() : found_cookie_(false) {}
|
||||||
|
+
|
||||||
|
+ bool found_cookie() { return found_cookie_; }
|
||||||
|
+
|
||||||
|
+ void WaitForPluginRequest() {
|
||||||
|
+ if (found_cookie_)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ runner_ = new MessageLoopRunner;
|
||||||
|
+ runner_->Run();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ private:
|
||||||
|
+ // ResourceDispatcherHostDelegate implementation:
|
||||||
|
+ virtual void OnResponseStarted(
|
||||||
|
+ net::URLRequest* request,
|
||||||
|
+ ResourceContext* resource_context,
|
||||||
|
+ ResourceResponse* response,
|
||||||
|
+ IPC::Sender* sender) OVERRIDE {
|
||||||
|
+ // The URL below comes from plugin_geturl_test.cc.
|
||||||
|
+ if (!EndsWith(request->url().spec(),
|
||||||
|
+ "npapi/plugin_ref_target_page.html",
|
||||||
|
+ true)) {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ net::HttpRequestHeaders headers;
|
||||||
|
+ bool found_cookie = false;
|
||||||
|
+ if (request->GetFullRequestHeaders(&headers) &&
|
||||||
|
+ headers.ToString().find("Cookie: blah") != std::string::npos) {
|
||||||
|
+ found_cookie = true;
|
||||||
|
+ }
|
||||||
|
+ BrowserThread::PostTask(
|
||||||
|
+ BrowserThread::UI,
|
||||||
|
+ FROM_HERE,
|
||||||
|
+ base::Bind(&TestResourceDispatcherHostDelegate::GotCookie,
|
||||||
|
+ base::Unretained(this), found_cookie));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ void GotCookie(bool found_cookie) {
|
||||||
|
+ found_cookie_ = found_cookie;
|
||||||
|
+ if (runner_)
|
||||||
|
+ runner_->QuitClosure().Run();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ scoped_refptr<MessageLoopRunner> runner_;
|
||||||
|
+ bool found_cookie_;
|
||||||
|
+
|
||||||
|
+ DISALLOW_COPY_AND_ASSIGN(TestResourceDispatcherHostDelegate);
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+// Ensure that cookies get sent with plugin requests.
|
||||||
|
+IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(Cookies)) {
|
||||||
|
+ // Create a new browser just to ensure that the plugin process' child_id is
|
||||||
|
+ // not equal to its type (PROCESS_TYPE_PLUGIN), as that was the error which
|
||||||
|
+ // caused this bug.
|
||||||
|
+ NavigateToURL(CreateBrowser(), GURL("about:blank"));
|
||||||
|
+
|
||||||
|
+ ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
|
||||||
|
+ GURL url(embedded_test_server()->GetURL("/npapi/cookies.html"));
|
||||||
|
+
|
||||||
|
+ TestResourceDispatcherHostDelegate test_delegate;
|
||||||
|
+ ResourceDispatcherHostDelegate* old_delegate =
|
||||||
|
+ ResourceDispatcherHostImpl::Get()->delegate();
|
||||||
|
+ ResourceDispatcherHostImpl::Get()->SetDelegate(&test_delegate);
|
||||||
|
+ LoadAndWait(url);
|
||||||
|
+ test_delegate.WaitForPluginRequest();
|
||||||
|
+ ASSERT_TRUE(test_delegate.found_cookie());
|
||||||
|
+ ResourceDispatcherHostImpl::Get()->SetDelegate(old_delegate);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
} // namespace content
|
||||||
|
Index: content/test/data/npapi/cookies.html
|
||||||
|
===================================================================
|
||||||
|
--- content/test/data/npapi/cookies.html (revision 0)
|
||||||
|
+++ content/test/data/npapi/cookies.html (revision 0)
|
||||||
|
@@ -0,0 +1,27 @@
|
||||||
|
+<html>
|
||||||
|
+
|
||||||
|
+<head>
|
||||||
|
+<script src="npapi.js"></script>
|
||||||
|
+<script>document.cookie="blah"</script>
|
||||||
|
+</head>
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+<body>
|
||||||
|
+<div id="statusPanel" style="border: 1px solid red; width: 100%">
|
||||||
|
+Test running....
|
||||||
|
+</div>
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+Cookies Test<p>
|
||||||
|
+This test fetches an URL via the plugin, and verifies that the cookies are sent
|
||||||
|
+with plugin-initiated requests.
|
||||||
|
+
|
||||||
|
+<embed type="application/vnd.npapi-test"
|
||||||
|
+ src="foo"
|
||||||
|
+ name="cookies"
|
||||||
|
+ id="1"
|
||||||
|
+ mode="np_embed"
|
||||||
|
+>
|
||||||
|
+
|
||||||
|
+</body>
|
||||||
|
+</html>
|
||||||
|
|
||||||
|
Property changes on: content\test\data\npapi\cookies.html
|
||||||
|
___________________________________________________________________
|
||||||
|
Added: svn:mime-type
|
||||||
|
+ text/html
|
||||||
|
Added: svn:eol-style
|
||||||
|
+ LF
|
||||||
|
|
||||||
|
Index: content/test/plugin/plugin_geturl_test.cc
|
||||||
|
===================================================================
|
||||||
|
--- content/test/plugin/plugin_geturl_test.cc (revision 233522)
|
||||||
|
+++ content/test/plugin/plugin_geturl_test.cc (working copy)
|
||||||
|
@@ -48,7 +48,8 @@
|
||||||
|
expect_404_response_(false),
|
||||||
|
npn_evaluate_context_(false),
|
||||||
|
handle_url_redirects_(false),
|
||||||
|
- received_url_redirect_notification_(false) {
|
||||||
|
+ received_url_redirect_notification_(false),
|
||||||
|
+ check_cookies_(false) {
|
||||||
|
}
|
||||||
|
|
||||||
|
PluginGetURLTest::~PluginGetURLTest() {}
|
||||||
|
@@ -78,7 +79,14 @@
|
||||||
|
"geturlredirectnotify")) {
|
||||||
|
handle_url_redirects_ = true;
|
||||||
|
}
|
||||||
|
- return PluginTest::New(mode, argc, argn, argv, saved);
|
||||||
|
+
|
||||||
|
+ NPError error = PluginTest::New(mode, argc, argn, argv, saved);
|
||||||
|
+
|
||||||
|
+ // The above sets test_name().
|
||||||
|
+ if (test_name() == "cookies")
|
||||||
|
+ check_cookies_ = true;
|
||||||
|
+
|
||||||
|
+ return error;
|
||||||
|
}
|
||||||
|
|
||||||
|
NPError PluginGetURLTest::SetWindow(NPWindow* pNPWindow) {
|
||||||
|
@@ -108,6 +116,13 @@
|
||||||
|
id(), REDIRECT_SRC_URL, NULL,
|
||||||
|
reinterpret_cast<void*>(REDIRECT_SRC_URL_NOTIFICATION_ID));
|
||||||
|
return NPERR_NO_ERROR;
|
||||||
|
+ } else if (check_cookies_) {
|
||||||
|
+ HostFunctions()->geturlnotify(
|
||||||
|
+ id(),
|
||||||
|
+ "plugin_ref_target_page.html",
|
||||||
|
+ NULL,
|
||||||
|
+ reinterpret_cast<void*>(SELF_URL_STREAM_ID));
|
||||||
|
+ return NPERR_NO_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string url = SELF_URL;
|
||||||
|
@@ -161,7 +176,7 @@
|
||||||
|
return NPERR_NO_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (!fail_write_url_.empty()) {
|
||||||
|
+ if (!fail_write_url_.empty() || check_cookies_) {
|
||||||
|
return NPERR_NO_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -217,7 +232,7 @@
|
||||||
|
return PluginTest::WriteReady(stream);
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (!referrer_target_url_.empty()) {
|
||||||
|
+ if (!referrer_target_url_.empty() || check_cookies_) {
|
||||||
|
return STREAM_CHUNK;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -242,7 +257,7 @@
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (!referrer_target_url_.empty()) {
|
||||||
|
+ if (!referrer_target_url_.empty() || check_cookies_) {
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -314,6 +329,11 @@
|
||||||
|
return NPERR_NO_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (check_cookies_) {
|
||||||
|
+ SignalTestCompleted();
|
||||||
|
+ return NPERR_NO_ERROR;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
unsigned long stream_id =
|
||||||
|
reinterpret_cast<unsigned long>(stream->notifyData);
|
||||||
|
switch (stream_id) {
|
||||||
|
@@ -367,6 +387,9 @@
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (check_cookies_)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
COMPILE_ASSERT(sizeof(unsigned long) <= sizeof(data), cast_validity_check);
|
||||||
|
unsigned long stream_id = reinterpret_cast<unsigned long>(data);
|
||||||
|
switch (stream_id) {
|
||||||
|
Index: content/test/plugin/plugin_geturl_test.h
|
||||||
|
===================================================================
|
||||||
|
--- content/test/plugin/plugin_geturl_test.h (revision 233522)
|
||||||
|
+++ content/test/plugin/plugin_geturl_test.h (working copy)
|
||||||
|
@@ -57,6 +57,7 @@
|
||||||
|
std::string page_not_found_url_;
|
||||||
|
std::string fail_write_url_;
|
||||||
|
std::string referrer_target_url_;
|
||||||
|
+ bool check_cookies_;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace NPAPIClient
|
||||||
|
Index: content/test/plugin/plugin_test_factory.cc
|
||||||
|
===================================================================
|
||||||
|
--- content/test/plugin/plugin_test_factory.cc (revision 233522)
|
||||||
|
+++ content/test/plugin/plugin_test_factory.cc (working copy)
|
||||||
|
@@ -38,7 +38,8 @@
|
||||||
|
} else if (test_name == "geturl" || test_name == "geturl_404_response" ||
|
||||||
|
test_name == "geturl_fail_write" ||
|
||||||
|
test_name == "plugin_referrer_test" ||
|
||||||
|
- test_name == "geturlredirectnotify") {
|
||||||
|
+ test_name == "geturlredirectnotify" ||
|
||||||
|
+ test_name == "cookies") {
|
||||||
|
new_test = new PluginGetURLTest(instance, host_functions);
|
||||||
|
} else if (test_name == "npobject_identity") {
|
||||||
|
new_test = new NPObjectIdentityTest(instance, host_functions);
|
|
@ -0,0 +1,13 @@
|
||||||
|
Index: content/child/npapi/plugin_url_fetcher.cc
|
||||||
|
===================================================================
|
||||||
|
--- content/child/npapi/plugin_url_fetcher.cc (revision 233351)
|
||||||
|
+++ content/child/npapi/plugin_url_fetcher.cc (working copy)
|
||||||
|
@@ -145,7 +145,7 @@
|
||||||
|
|
||||||
|
void PluginURLFetcher::URLRedirectResponse(bool allow) {
|
||||||
|
if (allow) {
|
||||||
|
- bridge_->SetDefersLoading(true);
|
||||||
|
+ bridge_->SetDefersLoading(false);
|
||||||
|
} else {
|
||||||
|
bridge_->Cancel();
|
||||||
|
plugin_stream_->DidFail(resource_id_); // That will delete |this|.
|
Loading…
Reference in a new issue