0
Commit Graph

70 Commits

Author SHA1 Message Date
Oksana Zhuravlova
7940703029 [CodeHealth] Fix UnsafeDanglingUntriaged in SafeBrowsing
This CL is part of a larger cleanup effort to triage dangling pointers
and ensure they aren't the cause of memory issues in Chrome. See:
https://docs.google.com/document/d/164SnySRX6MZgFkX8qLLLClTnZ0S8s5wLiNFWNyQ8f4E/edit.

This change replaces raw_ptr<ResourceContext> in MojoSafeBrowsingImpl with WeakPtr.

Bug: 1407653, 1412056
Change-Id: If35a2349734762c1cd34e342432a249336bb6c38
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4250602
Reviewed-by: Xinghui Lu <xinghuilu@chromium.org>
Commit-Queue: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1105835}
2023-02-15 20:21:40 +00:00
Avi Drissman
4e1b7bc33d Update copyright headers in content/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c34.

No-Try: true
No-Presubmit: true
Bug: 1098010
Change-Id: I8c0f009d16350271f07d8e5e561085822cc9dd27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3895935
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047456}
2022-09-15 14:03:50 +00:00
John Abd-El-Malek
76ad70a295 Reland "Move WebUI code to run on the UI thread."
This reverts commit 8f6d952389.

Per analysis of all the waterfall bots that run this chrome_all_tast_tests, this doesn't affect the flakiness. Details in
https://bugs.chromium.org/p/chromium/issues/detail?id=1082326#c51

Original change's description:
> Revert moving WebUI code to run on the UI thread as there are still PFQ flakes.
>
> Revert "Reland "Move WebUI code to run on the UI thread only.""
>
> This reverts commit 52fd322ec1.
>
> Revert "Reland "Remove InstantIOContext since it's not needed anymore.""
>
> This reverts commit 6360b9fdb0.
>
> Revert "Add extra thread hops in WebUI code on ChromeOS to simulate old timing."
>
> This reverts commit dbb65740f2.
>
> TBR=jennyz@chromium.org
>
> Bug: 1082326, 1062873
> Change-Id: Ic6e6d1cce833c9927ac80ceada5e682c3d120553
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2203707
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Commit-Queue: John Abd-El-Malek <jam@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#769199}

TBR=jennyz@chromium.org

Bug: 1082326, 1062873
Change-Id: I577980c0240321a1f39b72f70fc63556c2f82cac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2203411
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Jenny Zhang <jennyz@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#769725}
2020-05-18 16:08:12 +00:00
John Abd-El-Malek
8f6d952389 Revert moving WebUI code to run on the UI thread as there are still PFQ flakes.
Revert "Reland "Move WebUI code to run on the UI thread only.""

This reverts commit 52fd322ec1.

Revert "Reland "Remove InstantIOContext since it's not needed anymore.""

This reverts commit 6360b9fdb0.

Revert "Add extra thread hops in WebUI code on ChromeOS to simulate old timing."

This reverts commit dbb65740f2.

TBR=jennyz@chromium.org

Bug: 1082326, 1062873
Change-Id: Ic6e6d1cce833c9927ac80ceada5e682c3d120553
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2203707
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#769199}
2020-05-15 08:44:17 +00:00
John Abd-El-Malek
52fd322ec1 Reland "Move WebUI code to run on the UI thread only."
This is a reland of 2dd9b658bb. There's no change, the fix was in different code in r768065.

TBR=nasko@chromium.org

Original change's description:
> Move WebUI code to run on the UI thread only.
>
> The optimization to run it on the IO thread was for the non-network service path. We can now simplify this.
>
> InstantIOContext can be removed, I'll leave that for a follow-up as this is already big.
>
> Bug: 908955,1062873
> Change-Id: Ia209d22575f49159227e49accf249dccb4fbaffe
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2190744
> Reviewed-by: Nasko Oskov <nasko@chromium.org>
> Commit-Queue: John Abd-El-Malek <jam@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#767182}

Bug: 908955, 1062873
Change-Id: Iae51e1c9b17a9c9d68bdfebd3a07387f34070339
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2197500
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#768133}
2020-05-13 04:16:27 +00:00
Fergus Dall
24baf18ad1 Revert "Move WebUI code to run on the UI thread only."
This reverts commit 2dd9b658bb.

Reason for revert: Broke test CrostiniManagerRestartTest.RestartDelayAndSuccessWhenVmStopping on ASAN and MSAN CrOS bots.

First failures:
https://ci.chromium.org/p/chromium/builders/ci/Linux%20Chromium%20OS%20ASan%20LSan%20Tests%20%281%29/37623
https://ci.chromium.org/p/chromium/builders/ci/Linux%20ChromiumOS%20MSan%20Tests/19081

Bisection pinpoints this as the bad CL

Original change's description:
> Move WebUI code to run on the UI thread only.
> 
> The optimization to run it on the IO thread was for the non-network service path. We can now simplify this.
> 
> InstantIOContext can be removed, I'll leave that for a follow-up as this is already big.
> 
> Bug: 908955,1062873
> Change-Id: Ia209d22575f49159227e49accf249dccb4fbaffe
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2190744
> Reviewed-by: Nasko Oskov <nasko@chromium.org>
> Commit-Queue: John Abd-El-Malek <jam@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#767182}

TBR=nasko@chromium.org,jam@chromium.org

Change-Id: I35de3a275f1d2a626140670e01021985c6b0be0a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 908955, 1062873, 1081232
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2195423
Commit-Queue: Fergus Dall <sidereal@google.com>
Reviewed-by: Fergus Dall <sidereal@google.com>
Cr-Commit-Position: refs/heads/master@{#767602}
2020-05-12 00:41:50 +00:00
John Abd-El-Malek
2dd9b658bb Move WebUI code to run on the UI thread only.
The optimization to run it on the IO thread was for the non-network service path. We can now simplify this.

InstantIOContext can be removed, I'll leave that for a follow-up as this is already big.

Bug: 908955,1062873
Change-Id: Ia209d22575f49159227e49accf249dccb4fbaffe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2190744
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#767182}
2020-05-11 05:08:57 +00:00
Hans Wennborg
0917de897c Remove/replace unnecessary logging.h includes in .cc files (content)
CHECK, CHECK_EQ etc., and NOTREACHED/NOTIMPLEMENTED have moved
to the much smaller headers check.h, check_op.h, and notreached.h,
respectively.

This CL updates .cc files to use those headers instead when
possible, with the purpose of saving compile time.

(Split out from https://crrev.com/c/2164525 which also has
notes on how the change was generated.)

Bug: 1031540
Change-Id: I643818242b92e19a1048fac89dd8aae323e8b1ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2164510
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Alex Gough <ajgo@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#763511}
2020-04-28 20:21:15 +00:00
Marijn Kruisselbrink
71783b53e1 [Blobs] Remove no longer used method that looked up blobs by UUID.
Bug: 740744
Change-Id: Ic22655d70695ca04ab30300293ecd24a92dab3ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1867295
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#708326}
2019-10-22 20:30:38 +00:00
John Abd-El-Malek
346c99158a Remove ResourceRequestInfo.
Bug: 934009
Change-Id: I1bf1b1bd6e86bc32aa49c3ea7e5a37b6a53fc580
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1728266
Auto-Submit: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Reviewed-by: Clark DuVall <cduvall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682907}
2019-07-31 20:48:58 +00:00
John Abd-El-Malek
0e82fe7f42 Stop using ResourceDispatcherHost outside of content/ and remove a bunch of usage inside content/.
It's about to be deleted.

Bug: 934009
Change-Id: I20fc1e1b716ac9fafcc7574db5464e8000d27655
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1719835
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Clark DuVall <cduvall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#681545}
2019-07-27 00:06:29 +00:00
John Abd-El-Malek
8d5d3a3dec Remove the streams code as it's no longer used.
Bug: 934009
Change-Id: Idcf36e666b12cb0029f6c341c868ccf4e4cba450
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1639597
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Sam McNally <sammc@chromium.org>
Auto-Submit: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665444}
2019-06-03 02:38:49 +00:00
Jeremy Roman
8dfbfecd30 Remove unnecessary includes of base/memory/ptr_util.h in content/.
It no longer defines base::MakeUnique, so it should only be included
where base::WrapUnique is used.

Generated by:
  for x in `git grep -l '#include "base/memory/ptr_util.h"' content`; do \
    grep -q WrapUnique "$x" || sed -i -e \
    '/^#include "base\/memory\/ptr_util\.h"$/d' "$x"; done

Bug: 755727
Tbr: mkwst@chromium.org
Change-Id: Ie2a34ff8f0fe83491185cd9f1a0aa52aa21829bb
Reviewed-on: https://chromium-review.googlesource.com/1005834
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549918}
2018-04-11 17:35:53 +00:00
Jeremy Roman
04f27c3797 Replace base::MakeUnique with std::make_unique in content/.
base/memory/ptr_util.h includes will be cleaned up later.

Generated by:
git grep -l base::MakeUnique content/ | xargs perl -pi -e 's/base::MakeUnique/std::make_unique/'

Bug: 755727
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: I10d622bde1d70b9a5f5aee0f229262c7018ec56b
Reviewed-on: https://chromium-review.googlesource.com/740181
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512186}
2017-10-27 15:20:55 +00:00
Daniel Bratell
68ee7ffea2 Deduplicate two constants kBlobStorageContextKeyName
We declared the key to lookup the chrome blob storage at
two places. This caused problems in jumbo builds where
cc files are merged and the symbols clashed.

Bug: 746953
Change-Id: Icc11b256026536983841b084f6d2a74358594a47
Reviewed-on: https://chromium-review.googlesource.com/738133
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511608}
2017-10-25 22:06:56 +00:00
avi
1ed4a43703 Switch to using scoped_ptr with UserData
BUG=690937
TEST=none

Review-Url: https://codereview.chromium.org/2815913005
Cr-Commit-Position: refs/heads/master@{#466896}
2017-04-25 05:39:41 +00:00
mmenke
c0b2b8b1b9 Move MediaDeviceIDSalt from ProfileIOData to ProfileImpl.
The object is never used on the IO thread, and even had DCHECKs to
ensure that's the case, so it makes no sense in ProfileIOData.

It's also one of the few things exposed by ResourceContext, which we're
probably going to get rid of.

BUG=712296
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2820163002
Cr-Commit-Position: refs/heads/master@{#466358}
2017-04-21 16:27:52 +00:00
gab
7b1d677169 Make SupportsUserData sequence-affine instead of thread-affine.
This is making progress in issue 675631 as well as unblocking
https://codereview.chromium.org/2592813002/ (per
AndroidProviderBackend::FromHistoryBackend()'s usage).

BUG=675631
TBR=clamy,nhiroki (for side-effects in content/ and storage/browser/fileapi/)

Review-Url: https://codereview.chromium.org/2597773002
Cr-Commit-Position: refs/heads/master@{#440406}
2016-12-22 14:07:57 +00:00
rsleevi
5d916f6c6b Remove support for the keygen tag
This removes support for <keygen> by updating it
to be an HTMLUnknownElement. As a result, it's
no longer a form-associated element and no
longer has IDL-assigned properties.

The <keygen> tag is still left in the parser,
similar to <applet>, so that it maintains the
document parse behaviours (such as self-closing),
but is otherwise a neutered element.

Tests that were relying on <keygen> having its
own browser-created shadow root (for its custom
select element) have been updated to use
progress bars, while other tests (such as
<keygen>-related crash tests) have been
fully removed.

As Blink no longer treats this tag as special,
all the related IPC infrastructure is removed,
including preferences and enterprise flags,
and all localized strings, as they're all now
unreachable.

This concludes the "Intent to Remove" thread
for <keygen> at
https://groups.google.com/a/chromium.org/d/msg/blink-dev/z_qEpmzzKh8/BH-lkwdgBAAJ

BUG=568184
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2536993002
Cr-Commit-Position: refs/heads/master@{#440245}
2016-12-21 22:42:44 +00:00
ricea
641bb021db Re-write many calls to WrapUnique() with MakeUnique()
A mostly-automated change to convert instances of WrapUnique(new Foo(...)) to
MakeUnique<Foo>(...). See the thread at
https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/iQgMedVA8-k
for background.

To avoid requiring too many manual fixups, the change skips some cases that are
frequently problematic. In particular, in methods named Foo::Method() it will
not try to change WrapUnique(new Foo()) to MakeUnique<Foo>(). This is because
Foo::Method() may be accessing an internal constructor of Foo.

Cases where MakeUnique<NestedClass>(...) is called within a method of
OuterClass are common but hard to detect automatically, so have been fixed-up
manually.

The only types of manual fix ups applied are:
1) Revert MakeUnique back to WrapUnique
2) Change NULL to nullptr in argument list (MakeUnique cannot forward NULL
   correctly)
3) Add base:: namespace qualifier where missing.

WrapUnique(new Foo) has not been converted to MakeUnique<Foo>() as this might
change behaviour if Foo does not have a user-defined constructor. For example,
WrapUnique(new int) creates an unitialised integer, but MakeUnique<int>()
creates an integer initialised to 0.

git cl format has been been run over the CL. Spot-checking has uncovered no
cases of mis-formatting.

  BUG=637812
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2256173002
Cr-Commit-Position: refs/heads/master@{#416174}
2016-09-02 02:53:32 +00:00
jam
347b567048 Remove resource_context.h include from resource_loader.cc.
Instead have it get the cert provider from its delegate (ResourceDispatcherHost) which in turn gets it from its delegate. The new method in ResourceDispatcherHostDelegate does use ResourceContext, but we are centralizing its use in just one class. In the future when the interface to resource dispatcher is mojo calls, we will have the child process' user ID which we can then use to get a profile interface for that user.

BUG=598073

Review-Url: https://codereview.chromium.org/2088763004
Cr-Commit-Position: refs/heads/master@{#401402}
2016-06-22 21:11:36 +00:00
jam
95ba699eba Remove debugging code for fixed bugs. Also clean up unused includes.
BUG=90971,598073

Review-Url: https://codereview.chromium.org/2062263002
Cr-Commit-Position: refs/heads/master@{#399943}
2016-06-15 17:26:53 +00:00
guidou
91768ed181 Reland of Make default media device ID salts random by default (patchset id:1 of https://codereview.chromium.org/2065383003/ )
Reason for revert:
Creating reland. The problem was a test that gets the salt on the IO thread. It should be changed to the UI thread.

Original issue's description:
> Revert of Make default media device ID salts random by default (patchset  id:260001 of https://codereview.chromium.org/1987643002/ )
>
> Reason for revert:
> Reverting because it is breaking the WebRTC MacTester bot.
> https://build.chromium.org/p/chromium.webrtc/builders/Mac%20Tester/builds/55969/
>
> Original issue's description:
> > This results in different hashed device IDs on each session on embedders that don't have a specialized implementation of device ID salts such as WebView, Blimp and Content Shell. The new default helps prevent user fingerprinting on these embedders.
> >
> > Since the new default logic is basically the same as for Chrome incognito mode, Chrome's implementation of salts has been updated to defer to the new default on incognito mode.
> >
> > BUG=315022
> >
> > Committed: https://crrev.com/4db1329e005388540eb07429ac97827ca9bc422b
> > Cr-Commit-Position: refs/heads/master@{#399883}
>
> TBR=jam@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=315022
>
> Committed: https://crrev.com/f72bda81d0c3e6f256826e9ecdf6d745e4ad76c8
> Cr-Commit-Position: refs/heads/master@{#399887}

TBR=jam@chromium.org
BUG=315022

Review-Url: https://codereview.chromium.org/2068103003
Cr-Commit-Position: refs/heads/master@{#399902}
2016-06-15 15:51:26 +00:00
guidou
f72bda81d0 Revert of Make default media device ID salts random by default (patchset id:260001 of https://codereview.chromium.org/1987643002/ )
Reason for revert:
Reverting because it is breaking the WebRTC MacTester bot.
https://build.chromium.org/p/chromium.webrtc/builders/Mac%20Tester/builds/55969/

Original issue's description:
> This results in different hashed device IDs on each session on embedders that don't have a specialized implementation of device ID salts such as WebView, Blimp and Content Shell. The new default helps prevent user fingerprinting on these embedders.
>
> Since the new default logic is basically the same as for Chrome incognito mode, Chrome's implementation of salts has been updated to defer to the new default on incognito mode.
>
> BUG=315022
>
> Committed: https://crrev.com/4db1329e005388540eb07429ac97827ca9bc422b
> Cr-Commit-Position: refs/heads/master@{#399883}

TBR=jam@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=315022

Review-Url: https://codereview.chromium.org/2065383003
Cr-Commit-Position: refs/heads/master@{#399887}
2016-06-15 12:57:18 +00:00
guidou
4db1329e00 This results in different hashed device IDs on each session on embedders that don't have a specialized implementation of device ID salts such as WebView, Blimp and Content Shell. The new default helps prevent user fingerprinting on these embedders.
Since the new default logic is basically the same as for Chrome incognito mode, Chrome's implementation of salts has been updated to defer to the new default on incognito mode.

BUG=315022

Review-Url: https://codereview.chromium.org/1987643002
Cr-Commit-Position: refs/heads/master@{#399883}
2016-06-15 11:29:43 +00:00
jam
805952d3dd Remove unused test code in ~ResourceContext to handle it being destructed on UI threads.
The need for this probably went away with TestBrowserThreadBundle.

BUG=598073

Review-Url: https://codereview.chromium.org/2064293002
Cr-Commit-Position: refs/heads/master@{#399839}
2016-06-15 04:39:55 +00:00
dmurph
7ac019a90c [BlobStorage] Moving all blob files to applicable directories
This is only file moves, this doesn't have any code or behavior changes.

Review-Url: https://codereview.chromium.org/1934223004
Cr-Commit-Position: refs/heads/master@{#393403}
2016-05-13 00:14:51 +00:00
dcheng
5971627d34 Convert //content/browser from scoped_ptr to std::unique_ptr
BUG=554298
R=avi@chromium.org

Review URL: https://codereview.chromium.org/1874893002

Cr-Commit-Position: refs/heads/master@{#386285}
2016-04-09 05:20:41 +00:00
amistry
3f29b4056e Post a task to the IO thread to add a ResourceContext in ResourceDispatcherHostImpl.
ResourceDispatcherHostImpl::AddResourceContext() is called on the UI thread,
but all other users of |active_resource_contexts_| access it on the IO thread.

Review URL: https://codereview.chromium.org/1600263002

Cr-Commit-Position: refs/heads/master@{#371687}
2016-01-27 01:57:48 +00:00
avi
b7348940d3 Switch to standard integer types in content/browser/.
BUG=138542
TBR=jam@chromium.org

Review URL: https://codereview.chromium.org/1549113002

Cr-Commit-Position: refs/heads/master@{#366868}
2015-12-25 20:58:00 +00:00
mostynb
042582e3d4 favor DCHECK_CURRENTLY_ON for better logs in content/browser/[q-z]*
BUG=466848

Review URL: https://codereview.chromium.org/1005683003

Cr-Commit-Position: refs/heads/master@{#320804}
2015-03-16 22:15:02 +00:00
horo
d556043ea4 [ServiceWorker] Make Stream support in ServiceWorkerURLRequestJob
In ServiceWorkerURLRequestJob::DidDispatchFetchEvent(), if response.stream_url of ServiceWorkerHostMsg_FetchEventFinished is set, ServiceWorkerURLRequestJob starts reading the body of the response from the stream instead of the blob.

But the stream may not be registered yet.
It is because ServiceWorkerHostMsg_FetchEventFinished is sent from the worker thread but StreamHostMsg_StartBuilding which triggers the stream registration is sent from the main thread of the ServiceWorker process.
So if ServiceWorkerURLRequestJob can't get the stream in DidDispatchFetchEvent(), call StreamRegistry::SetRegisterObserver() to receive the stream registration event.

When ServiceWorkerURLRequestJob successfuly gets the stream, it starts reading the stream.
The codes for reading the stream is almost same as the codes in StreamURLRequestJob.

This change depends on these changes:
  https://codereview.chromium.org/760823002
  https://codereview.chromium.org/759823003

BUG=436424

Review URL: https://codereview.chromium.org/759203002

Cr-Commit-Position: refs/heads/master@{#308059}
2014-12-12 06:20:32 +00:00
wjmaclean
caa7d6d94e Migrate HostZoomMap to live in StoragePartition.
This CL changes the persistence of host zoom levels to be on
a per-storage-partition basis, as opposed to (the current)
per-profile basis. This is needed to allow WebView content
(withing apps) to keep their zoom levels independent of those
in the main browser window.

BUG=335317

Review URL: https://codereview.chromium.org/393133002

Cr-Commit-Position: refs/heads/master@{#303841}
2014-11-12 16:42:27 +00:00
wjmaclean
f9b6ec8dbf Rename HostZoomMap::GetForBrowserContext() to GetDefaultForBrowserContext().
HostZoomMap will be moving from BrowserContext to StoragePartition soon
as part of fixing this bug. Many sites will still want to access the
default HostZoomMap for a BrowserContext, so we will rename this
function in order to be clear about that.

BUG=335317

Review URL: https://codereview.chromium.org/506073002

Cr-Commit-Position: refs/heads/master@{#292147}
2014-08-27 14:34:53 +00:00
antrim@chromium.org
b73a03cdd1 Fix possible crash when HostZoomMap is NULL
BUG=375919
R=sky@chromium.org

Review URL: https://codereview.chromium.org/350203002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279518 0039d316-1c4b-4281-b951-d872f2087c98
2014-06-24 22:25:49 +00:00
joi@chromium.org
f9583f8352 Allow retrieval of media device ID salt even after ResourceContext has gone away.
TBR=willchan@chromium.org
BUG=341211

Review URL: https://codereview.chromium.org/143003031

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251024 0039d316-1c4b-4281-b951-d872f2087c98
2014-02-13 15:34:21 +00:00
mattm@chromium.org
99e5e952f0 Update keygen to use correct NSS slot on ChromeOS multiprofile.
BUG=302126

Review URL: https://codereview.chromium.org/61643007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240868 0039d316-1c4b-4281-b951-d872f2087c98
2013-12-16 13:05:27 +00:00
perkj@chromium.org
cd80cce773 This cl implement a salt that is being used for obfuscating device ids before a device id is sent to the render process. The purpose of the salt is to make sure that the device ids as seen by the render process are invalidated if cookies are cleared.
BUG=269139
TEST= open http://src.chromium.org/chrome/trunk/src/chrome/test/data/webrtc/manual/peerconnection.html using http (not https) note the source ids in the Audio source and Video source dropdown. Restart chrome and notice that the source ids in the dropdown are unchanged. Clear the cookie cache and press the Refresh devices button and notice that the source ids have changed.

Review URL: https://codereview.chromium.org/54863002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238103 0039d316-1c4b-4281-b951-d872f2087c98
2013-12-02 15:19:19 +00:00
mattm@chromium.org
1ccb699d0f Get ClientCertStore through ResourceContext.
Make ClientCertStore::GetClientCerts asynchronous.

BUG=302125

Review URL: https://codereview.chromium.org/42773002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231750 0039d316-1c4b-4281-b951-d872f2087c98
2013-10-30 04:46:20 +00:00
zork@chromium.org
bb85a8c450 Reland r187230: Implement the Stream registry in content
This fixes the memory leaks introduced by the original CL.

BUG=171585


Review URL: https://chromiumcodereview.appspot.com/12637006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187777 0039d316-1c4b-4281-b951-d872f2087c98
2013-03-13 04:34:19 +00:00
zork@chromium.org
e19a0936b5 Revert 187230
> Implement the Stream registry in content
> 
> This is the first part of the content side of the Streams api.
> See:
> https://bugs.webkit.org/show_bug.cgi?id=110194
> https://dvcs.w3.org/hg/streams-api/raw-file/tip/Overview.htm
> 
> BUG=171585
> 
> 
> Review URL: https://chromiumcodereview.appspot.com/12335087

TBR=zork@chromium.org
Review URL: https://codereview.chromium.org/12611018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187274 0039d316-1c4b-4281-b951-d872f2087c98
2013-03-11 11:23:25 +00:00
zork@chromium.org
2ebbb66ffd Implement the Stream registry in content
This is the first part of the content side of the Streams api.
See:
https://bugs.webkit.org/show_bug.cgi?id=110194
https://dvcs.w3.org/hg/streams-api/raw-file/tip/Overview.htm

BUG=171585


Review URL: https://chromiumcodereview.appspot.com/12335087

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187230 0039d316-1c4b-4281-b951-d872f2087c98
2013-03-11 03:43:16 +00:00
jam@chromium.org
5bf1646f54 Clean up of url data manager classes in content: move URLDataSourceImpl to its own file, move all the code to the content namespace, and remove the "Chrome" prefix from classes.
TBR=scottmg
BUG=169170
Review URL: https://codereview.chromium.org/12093012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179096 0039d316-1c4b-4281-b951-d872f2087c98
2013-01-28 03:57:02 +00:00
jam@chromium.org
33c1c26ae2 Move core url data manager classes to content.
BUG=169170
Review URL: https://codereview.chromium.org/12049052

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178663 0039d316-1c4b-4281-b951-d872f2087c98
2013-01-24 21:56:26 +00:00
darin@chromium.org
678c036ef6 Add content/browser/loader/ for resource loading related classes.
This infrastructure is shared by both renderer and worker processes, so having
it live in renderer_host/ was not quite right.  This change also nicely reduces
the number of files in renderer_host/.

R=jam@chromium.org
Review URL: https://codereview.chromium.org/11414299

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171194 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-05 08:02:44 +00:00
stuartmorgan@chromium.org
ac7103c93d Add empty constructor/destructor to ResourceContext on iOS
Empty ResourceContext constructors and destructors are needed on iOS since 
profile_io_data has a subclass of the interface, but iOS doesn't use all the code in resource_context_impl.cc

Also removes a bunch of #include/using cruft in resource_context_impl.cc

BUG=None

Review URL: https://chromiumcodereview.appspot.com/11365253

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168192 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-16 12:27:38 +00:00
jam@chromium.org
464883218e Move remaining files in content\browser to the content namespace.
Review URL: https://codereview.chromium.org/11340029

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164828 0039d316-1c4b-4281-b951-d872f2087c98
2012-10-30 03:22:20 +00:00
ajwong@chromium.org
10eb2816fd continuing from http://http://codereview.chromium.org/10823241
This intentionally doesn't change the ChromeOS behavior at all.  They all still use the default FileSystemContext.

This code also exposes the normal and media URLRequestGetters via the StoragePartition, and cleans up a bit of code that was accessing the URLRequestGetter in odd ways.  Also, it makes Workers correctly use the Media Cache for Media fetches.

TBR=benjhyden,sky,davemoore,piman,mkwst,kalman
BUG=85121

Review URL: https://chromiumcodereview.appspot.com/10909182

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157284 0039d316-1c4b-4281-b951-d872f2087c98
2012-09-18 03:04:09 +00:00
michaeln@chromium.org
55c0ecae62 AppCache and StoragePartition'ing
* Get rid of BrowserContext::GetAppCacheService and ResourceContext::GetAppCacheService as they've been replace by accessors on the StoragePartition and WorkerStoragePartition classes.

* Added a BrowsingContext::GetRequestContextForStoragePartition(id) accessor so the constellation of storage context + main request context can initialized properly. Implemented that method in chrome's Profile class in terms of the existing GetRequestContextForIsolatedApp(id) accessor.

* Hold references to the ChromeAppCacheService and ChromeBlobStorageContext inside of ResourceMessageFilter and provide accessors to them. These are for use by the ResourceDispatcherHost singleton which would otherwise not have enough context to get needed references to partitioned things.

* Widen the ResourceDispatcherHostDelegate::RequestBeginning method to also take an AppCacheService* parameter since that value can no longer be retrieved via the ResourceContext. Chrome's impl of this delegate interface needs that value to construct OfflineResourceThrottles.

* Poke at WorkerProcessHost to create ResourceMessageFilters and others to utlize the correct URLRequestContext so the right set of cookies are used in shared workers.

TBR=mihaip,sail,thakis
BUG=85121

Review URL: https://chromiumcodereview.appspot.com/10916132

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156991 0039d316-1c4b-4281-b951-d872f2087c98
2012-09-15 05:12:34 +00:00
ajwong@chromium.org
7dc8935a75 Remove storage context accessors from ResourceContext.
ResourceContext is the IO thread projection of the Profile. Since one profile
may now have multiple StoragePartitions (and thus multiple storage contexts),
we need to remove these accessors. All code in the IO thread has enough
information to find their appropriate storage context objects without needing
to grab it through the ResourceContext.  The only users of the ResourceContext
storage context APIs are in worker_host classes.

As a result of this change, a number of APIs that previously just took 1
ResourceContext now need to take 4 additional objects. We could create a
StoragePartitionForIO class that parallels StoragePartition, but since the
API ugliness is purely limited to workers, the abstraction isn't worth its
weight.

BUG=85121


Review URL: https://chromiumcodereview.appspot.com/10885044

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156126 0039d316-1c4b-4281-b951-d872f2087c98
2012-09-11 21:41:01 +00:00