Please see the bug for the context.
Prior instrumentations showed:
The jank happens in more than 1 place:
URLRequest::Delegate::OnResponseStarted 34.3 jph
NetworkDelegate::OnRawBytesRead 16.4 jph
URLRequest::Delegate::OnReadCompleted 7.62 jph
... (the list continues, but further jankiness numbers are quite low)
I need to instrument
the code inside it to find out which part causes jank.
This is a mechanical change that adds instrumentation required to locate the
source of jankiness (i.e. a long-running fragment of code executed as a part of
the task that causes jank) in the code. See the bug for details on what kind of
jank we are after.
A number of similar CLs were landed, and none of them caused issues. They've
helped to find and fix janky code. The code of the instrumentation is highly
optimized and is not expected to affect performance. The code simply creates a
diagnostic task which is identical to ones created by PostTask or IPC message
handlers. The task gets created only in developer build and in Canary channel.
BUG=423948
TBR=jianli,danakj,jhawkins
Review URL: https://codereview.chromium.org/732633002
Cr-Commit-Position: refs/heads/master@{#304653}
Database destruction functions haven't correctly worked for plugin private
filesystems since the filesystem has a different directory structure
from other filesystems as follows:
- PluginPrivate FS: /path/to/File System/Plugins/<origins>/<plugin_id>/<paths>/<file>
- Other FS: /path/to/File System/<origins>/<storage type>/<paths>/<file>
This patch tweaks those functions correctly to delete contents and
metadata of the plugin private filesystem.
NOTE: A part of tests is contributed by xhwang@chromium.org:
https://codereview.chromium.org/580363003/
BUG=326429
TEST=content_unittests --gtest_filter=PluginPrivateFileSystemBackendTest.*
TEST=content_unittests --gtest_filter=ObfuscatedFileUtilTest.*
Review URL: https://codereview.chromium.org/579083004
Cr-Commit-Position: refs/heads/master@{#303213}
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}
The main user (and the immediate reason for the change) is to improve handle
ownership in content::ChildProcessLauncher.
This CL is not enforcing clean ownership beyond ChildProcessLauncher; that is
to be covered by subsequent CLs.
BUG=417532
TEST=base_unittests
R=scottmg@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/651253002
Cr-Commit-Position: refs/heads/master@{#300180}
Also various other fixes, e.g. condensing code, converting DCHECK_LT(0, a) -> DCHECK_GT(a, 0) (and the like) for readability, inserting a few typecasts.
BUG=none
TEST=none
Review URL: https://codereview.chromium.org/637023002
Cr-Commit-Position: refs/heads/master@{#299362}
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/623933003
Cr-Commit-Position: refs/heads/master@{#298389}
the notification order test.
* Before this patch, file_system_operation_impl_unittest can not test
the notification order because it doesn't have the update observer.
BUG=410198
TEST=content_unittests
Review URL: https://codereview.chromium.org/579153002
Cr-Commit-Position: refs/heads/master@{#295914}
This patch adds a field to the BufferedFileStreamReader constructor, which says
how much bytes in total are going to be requested. This information is used for
an efficient buffering strategy.
TEST=unit_tests: *BufferingFileStreamReader*
BUG=398338
Review URL: https://codereview.chromium.org/470323003
Cr-Commit-Position: refs/heads/master@{#295177}
RunLoop::Run() is needed if any of the operation is implemented using
asynchronous I/O in OS layer, or performed in a separate thread.
Currently, only Copy needs RunLoop::Run().
This CL replace all RunUntilIdle() with Run() to keep all test consistent.
BUG=411153
TEST=content_unittest
Review URL: https://codereview.chromium.org/557273002
Cr-Commit-Position: refs/heads/master@{#294365}
StreamCopyOrMoveImpl has some issue.
* Return infelicity error code.
* Don't notify to observer.
This issue is fixed in Issue 522543002 so we can support it in sandbox.
BUG=360088
TEST=content_unittests passed
Review URL: https://codereview.chromium.org/541363002
Cr-Commit-Position: refs/heads/master@{#293677}
This patch was generated by running the rewrite_scoped_refptr clang tool
on a Linux build.
BUG=110610
Review URL: https://codereview.chromium.org/508683002
Cr-Commit-Position: refs/heads/master@{#291941}
This contains fixes for the following sorts of issues:
* Signedness mismatch
* Assignment inside conditional
* Possibly-uninitialized local variable
This also contains a very small number of other cleanups to nearby code.
BUG=81439
TEST=none
Review URL: https://codereview.chromium.org/373873002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283169 0039d316-1c4b-4281-b951-d872f2087c98
With this change, nested filesystems mounted onto isolated context
can remember its original filesystem id, that unblocks the issue 370782
of drag-and-drop support in chromeos::FileSystemBackend.
BUG=370782, 386062
TBR=kaznacheev, benwells, dmichael, sky
Review URL: https://codereview.chromium.org/341043008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278666 0039d316-1c4b-4281-b951-d872f2087c98
This avoids a name conflict between winnt.h's FileSystemType enumerator
value and Chromium's fileapi::FileSystemType enum type. MSVC doesn't
care, but Clang diagnoses this with:
error: must use 'enum' tag to refer to type 'FileSystemType' in this scope
I could use the enum tag to avoid this ambiguity, but it would be very
inconsistent with other Chromium code. A full nested name specifier
seems better.
R=thakis@chromium.org,hans@chromium.orgTBR=kinuko@chromium.org
BUG=82385
Review URL: https://codereview.chromium.org/345673002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278332 0039d316-1c4b-4281-b951-d872f2087c98
Encoding scheme for the path component of the file system URL differs
between these classes, that is causing mismatch in some cases.
BUG=384222
Review URL: https://codereview.chromium.org/336193003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277695 0039d316-1c4b-4281-b951-d872f2087c98
This is being done to removeuse of a deprecated API in net/
BUG=81979
Review URL: https://codereview.chromium.org/307433002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273422 0039d316-1c4b-4281-b951-d872f2087c98
The Flush() call is relatively less important for SandboxFileSystems which
is stored in a internal storage, than external storage (e.g. USB storage).
And, it hurts performance of truncate()-write() use case on encrypted disk.
This CL removes Flush() on write completion on SandboxFileSystems.
Review URL: https://codereview.chromium.org/264993002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268914 0039d316-1c4b-4281-b951-d872f2087c98
This is a rehash of ericu's cl https://codereview.chromium.org/259773006/ with a fix in upload_data_stream_builder_unittest.cc to resolve the leak asan found.
TBR=ericu,piman
BUG=108012
Review URL: https://codereview.chromium.org/261993004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268023 0039d316-1c4b-4281-b951-d872f2087c98