1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 [
6 {
7 "namespace": "webViewRequest",
8 "description": "Use the <code>chrome.webViewRequest</code> API to intercept,
block, or modify requests in-flight. It is significantly faster than the <a hre
f='webRequest.html'><code>chrome.webRequest</code> API</a> because you can regis
ter rules that are evaluated in the browser rather than the JavaScript engine wi
th reduces roundtrip latencies and allows higher efficiency."
vabr (Chromium)
2013/10/25 20:40:24
Maybe we should be careful with saying "significan
Maybe we should be careful with saying "significantly faster", unless we have
benchmarks to prove it. While speed was one of the main motivations for
introducing DWR, and it saves the round-trips, the difference might not be that
significant after all, due to recent improvements in V8 and other parts of
Chrome critical for WebRequest.
There is still a good incentive to use DWR as opposed to the old WR: declarative
programming in general is a good practice to avoid boilerplate in the
extensions, content scripts, and improve security. The security win is prominent
outside of webview, where certain more dangerous parts of DWR (redirecting as
opposed to just blocking) can be separated by higher permissions. This is
probably not so relevant for webview.
Fady Samuel
2013/10/25 22:48:08
The original WebRequest requires more lines of cod
On 2013/10/25 20:40:24, vabr (Chromium) wrote:
> Maybe we should be careful with saying "significantly faster", unless we have
> benchmarks to prove it. While speed was one of the main motivations for
> introducing DWR, and it saves the round-trips, the difference might not be
that
> significant after all, due to recent improvements in V8 and other parts of
> Chrome critical for WebRequest.
>
> There is still a good incentive to use DWR as opposed to the old WR:
declarative
> programming in general is a good practice to avoid boilerplate in the
> extensions, content scripts, and improve security. The security win is
prominent
> outside of webview, where certain more dangerous parts of DWR (redirecting as
> opposed to just blocking) can be separated by higher permissions. This is
> probably not so relevant for webview.
The original WebRequest requires more lines of code. The declarative WebRequest
API is more succinct in some cases I feel. The WebRequest API is used
extensively in <webview> and so the declarative WebRequest was requested. I will
soften the language to say it is potentially faster.
On 2013/10/25 22:48:08, Fady Samuel wrote:
> On 2013/10/25 20:40:24, vabr (Chromium) wrote:
> > Maybe we should be careful with saying "significantly faster", unless we
have
> > benchmarks to prove it. While speed was one of the main motivations for
> > introducing DWR, and it saves the round-trips, the difference might not be
> that
> > significant after all, due to recent improvements in V8 and other parts of
> > Chrome critical for WebRequest.
> >
> > There is still a good incentive to use DWR as opposed to the old WR:
> declarative
> > programming in general is a good practice to avoid boilerplate in the
> > extensions, content scripts, and improve security. The security win is
> prominent
> > outside of webview, where certain more dangerous parts of DWR (redirecting
as
> > opposed to just blocking) can be separated by higher permissions. This is
> > probably not so relevant for webview.
>
> The original WebRequest requires more lines of code. The declarative
WebRequest
> API is more succinct in some cases I feel. The WebRequest API is used
> extensively in <webview> and so the declarative WebRequest was requested. I
will
> soften the language to say it is potentially faster.
Issue 28273006: <webview>: Implement declarativeWebRequest API
(Closed)
Created 7 years, 2 months ago by Fady Samuel
Modified 7 years, 1 month ago
Reviewers: Ken Rockot(use gerrit already), Matt Perry, battre, vabr (Chromium), lazyboy, Jeffrey Yasskin, James Hawkins
Base URL: https://chromium.googlesource.com/chromium/src.git@master
Comments: 124