| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Google C++ style guide states:
Explicitly annotate overrides of virtual functions or virtual
destructors with an override or (less frequently) final specifier.
Older (pre-C++11) code will use the virtual keyword as an inferior
alternative annotation. For clarity, use exactly one of override,
final, or virtual when declaring an override.
To better conform to these guidelines, the following constructs have
been rewritten:
- if a base class has a virtual destructor, then:
virtual ~Foo(); -> ~Foo() override;
- virtual void Foo() override; -> void Foo() override;
- virtual void Foo() override final; -> void Foo() final;
This patch was automatically generated. The clang plugin can generate
fixit hints, which are suggested edits when it is 100% sure it knows how
to fix a problem. The hints from the clang plugin were applied to the
source tree using the tool in https://codereview.chromium.org/598073004.
Several formatting edits by clang-format were manually reverted, due to
mangling of some of the more complicate IPC macros.
BUG=417463
Review URL: https://codereview.chromium.org/823713002
Cr-Commit-Position: refs/heads/master@{#309497}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the reader of the stream is aborted before the stream is registered,
StreamRegistry::RegisterStream() should fail to reduce the memory consumption.
So this change introduces StreamRegistry::RegisterReaderAbortedStream().
We will use this method in this situation:
- The request from the page is sent to the ServiceWorker.
- The ServiceWorker creates a Stream and starts uploading the data to the browser process with it.
- The browser process receives the stream URL in ServiceWorkerHostMsg_FetchEventFinished.
But it didn't receive StreamHostMsg_StartBuilding yet.
- The page stops the loading the resource.
-> Call this method in the browser process.
- The browser receives StreamHostMsg_StartBuilding and creates a Stream and registers it to the StreamRegistry.
-> This registration should fail.
BUG=436424
TEST=content_unittests --gtest_filter=StreamTest.*
Review URL: https://codereview.chromium.org/759823003
Cr-Commit-Position: refs/heads/master@{#308025}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is no way to flush the buffer in the stream.
This cl introduces Stream::flush method.
We can flush the buffer in the browser process using this method from blink.
We will use this method when we send the data from the ServiceWorker to the browser process progressively.
1/2 blink: https://codereview.chromium.org/747323007/
2/2 chromium: https://codereview.chromium.org/760823002/
BUG=436424
Review URL: https://codereview.chromium.org/760823002
Cr-Commit-Position: refs/heads/master@{#307684}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are planing to use Streams to send the data from the ServiceWorker to the browser process when FetchEvent.respondWith() is called. (crbug.com/436424)
When FetchEvent.respondWith() is called, we will create a blink::Stream and get the stream URL of it and send ServiceWorkerHostMsg_FetchEventFinished message with the stream URL to the browser process. And after that the ServiceWorker reads the body of the response and sends the data to the browser process using the Stream.
When we call blink::Stream::create() in the worker thread, StreamHostMsg_StartBuilding message is sent from the main thread.
And when the browser process receives this message, StreamRegistry::RegisterStream() is called.
But ServiceWorkerHostMsg_FetchEventFinished is sent from the worker thread.
So when the browser receives the FetchEventFinished message, StreamRegistry::RegisterStream() may not be called yet.
To support this condition we need to introduce StreamRegisterObserver.
When he browser process receives the FetchEventFinished message, it gets the Stream by calling StreamRegistry::GetStream(). And if it fails it registers a StreamRegisterObserver and waits for StreamHostMsg_StartBuilding message.
BUG=436424
TEST=content_unittests --gtest_filter=StreamTest.*
Review URL: https://codereview.chromium.org/755233002
Cr-Commit-Position: refs/heads/master@{#305792}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Google C++ style guide states:
Explicitly annotate overrides of virtual functions or virtual
destructors with an override or (less frequently) final specifier.
Older (pre-C++11) code will use the virtual keyword as an inferior
alternative annotation. For clarity, use exactly one of override,
final, or virtual when declaring an override.
To better conform to these guidelines, the following constructs have
been rewritten:
- if a base class has a virtual destructor, then:
virtual ~Foo(); -> ~Foo() override;
- virtual void Foo() override; -> void Foo() override;
- virtual void Foo() override final; -> void Foo() final;
This patch was automatically generated. The clang plugin can generate
fixit hints, which are suggested edits when it is 100% sure it knows how
to fix a problem. The hints from the clang plugin were applied to the
source tree using the tool in https://codereview.chromium.org/598073004.
BUG=417463
R=nasko@chromium.org
Review URL: https://codereview.chromium.org/678073006
Cr-Commit-Position: refs/heads/master@{#301534}
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch was automatically generated by applying clang fixit hints
generated by the plugin to the source tree.
BUG=417463
TBR=sky@chromium.org
Review URL: https://codereview.chromium.org/667943003
Cr-Commit-Position: refs/heads/master@{#300469}
|
|
|
|
|
|
|
|
|
|
|
| |
This step is a giant search and replace for OVERRIDE and FINAL to
replace them with their lowercase versions.
BUG=417463
Review URL: https://codereview.chromium.org/637183002
Cr-Commit-Position: refs/heads/master@{#298804}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using this, StreamURLRequestJob aborts itself.
For now, this value will be used to deal with memory limit exceed.
data_bytes_read_ is moved using this opportunity since it's a part of temporary buffer consists of data_ and data_length_.
BUG=169957
Review URL: https://chromiumcodereview.appspot.com/22942003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219170 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Stream instances report their memory usage to StreamRegistry to get
approval. If rejected, they unregisters themselves.
writer_ and reader_ are cleared immediately when memory usage
violation happens. Added task runner DCHECKs to ByteStreamReaderImpl
and ByteStreamWriterImpl so that we can check we're not violating
thread restriction.
BUG=169957
Review URL: https://chromiumcodereview.appspot.com/22908008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218933 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Check that once Stream::Finalize() is called and reader_ receives that,
reader_.ReadRawData() never returns STREAM_EMPTY.
Also removed unnecessary reader.Read() call.
BUG=272640
Review URL: https://chromiumcodereview.appspot.com/23007003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217514 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Stream::security_origin_ is not used at all for now. There's no
established code in Chromium to do origin checking. Security of
Blob/Stream resource loading now depends on origin checking
mechanism in Blink.
Keeping this variable without having any checking mechanism
confuses developers. Remove it until we build origin checking code
in Chromium.
Also, rename security_origin to origin, as it's nothing but an origin
URL.
BUG=263342
Review URL: https://chromiumcodereview.appspot.com/19798012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213830 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=260807
TEST=none
TBR=ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/19618002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212184 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"operator T*"
Linux fixes
BUG=110610
TBR=darin
Review URL: https://chromiumcodereview.appspot.com/16294003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203624 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=236029
R=avi@chromium.org
Review URL: https://chromiumcodereview.appspot.com/14335017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198316 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=171585
Review URL: https://chromiumcodereview.appspot.com/12645004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189172 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> 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
|
|
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
|