summaryrefslogtreecommitdiffstats
path: root/mojo/public
Commit message (Collapse)AuthorAgeFilesLines
* [mojo-sdk] Disable the RunnableAdapter constructor if the sink is a Runnable*.amistry2016-03-231-1/+18
| | | | | | | | | | | This allows the user to pass a Runnable* to the Callback's constructor without explicitly down casting it to a Runnable*. BUG=None Review URL: https://codereview.chromium.org/1813383003 Cr-Commit-Position: refs/heads/master@{#382946}
* Mojo C++ bindings: some MultiplexRouter optimization.yzshen2016-03-232-49/+86
| | | | | | | | | | | | | This CL: - reduces post tasks; - reduces map lookups; - removes unnecessary lock and state check when sending messages. BUG= Review URL: https://codereview.chromium.org/1831513002 Cr-Commit-Position: refs/heads/master@{#382933}
* Mojo bindings: Fix typemap includes.sammc2016-03-2322-209/+307
| | | | | | | | | | | | | | | | | | | | | | | Previously, a header defining a StructTraits specialization could not include its corresponding generated mojom header, due to the mojom header including the StructTraits header. This required a brittle set of forward declarations to correctly avoid this; in practice, this mostly led to StructTraits that were nominally for a particular variant, but included the generated mojom header from the default variant. This CL fixes the issue by splitting typemap headers into public_headers, which define the native type and are included by the generated mojom header, and headers which define the StructTraits specialization for the native type and are only included by the generated mojom source file, allowing the StructTraits header to include the generated mojom header. BUG=596202 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel Review URL: https://codereview.chromium.org/1821073002 Cr-Commit-Position: refs/heads/master@{#382893}
* Make ChannelMojo Send thread-saferockot2016-03-234-0/+15
| | | | | | | | | | | | | | | | Changes ChannelMojo to write outgoing Receive requests directly to the pipe rather than using its AssociatedInterfacePtr. The associated interface ID is still included in each outgoing message. This lets us mark ChannelMojo::Send as thread-safe, avoiding a thread-hop when sending IPCs through IPC::ChannelProxy. BUG=595082 Review URL: https://codereview.chromium.org/1825543002 Cr-Commit-Position: refs/heads/master@{#382762}
* Make mojo::Callback safe to copy across threads and destroy on any thread.amistry2016-03-216-32/+99
| | | | | | | | | | This brings the behaviour of mojo::Callback close to that of base::Callback. BUG=595939 Review URL: https://codereview.chromium.org/1819463002 Cr-Commit-Position: refs/heads/master@{#382349}
* Mojo C++ bindings: assume that all imported mojoms have the same variant as ↵yzshen2016-03-1911-22/+53
| | | | | | | | | | | | current mojom. This CL also disable struct_traits_unittest because variant+typemap is not supported currently. BUG=596202,596162 Review URL: https://codereview.chromium.org/1816703002 Cr-Commit-Position: refs/heads/master@{#382143}
* Mojo C++ bindings: fix sanity check of wtf string serialization.yzshen2016-03-181-11/+10
| | | | | | | | | | | | | | | | | Previously the code had a check that we use exactly the same WTF::String object for GetSerializedSize_ and Serialize_ call. However, because WTF::String is ref-counted, we may end up using different WTF::String objects referring to the same contents. That may happen, e.g., when moving WTF::String to a different container. This CL changes the sanity check to verify that the size of WTF::String remains unchanged. BUG=595791 Review URL: https://codereview.chromium.org/1810253002 Cr-Commit-Position: refs/heads/master@{#381880}
* [mojo-edk] Expose notification source to MojoWatch callbacksrockot2016-03-174-6/+34
| | | | | | | | | | | | | | | | This adds a flags argument to watch callbacks and exposes a flag to indicate that the callback was invoked as a result of some external process event (i.e. an incoming EDK IPC message). The public C++ Watcher implementation is updated to take advantage of this, effectively allowing us to dispatch to Mojo bindings synchronously when they live on the IO thread and are servicing messages from out-of-process. BUG=590495 Review URL: https://codereview.chromium.org/1811433002 Cr-Commit-Position: refs/heads/master@{#381767}
* Mojo C++ bindigns: fix generated namespace when variant is specified.yzshen2016-03-174-6/+36
| | | | | | | | | | | | | This fixed the issue that enum generated code didn't work when variant is specified. This is a quick fix, we need more fundermental improvement for variant handling code. BUG=595791 Review URL: https://codereview.chromium.org/1811853004 Cr-Commit-Position: refs/heads/master@{#381760}
* Move flush id from WebGraphicsContext3DImpl to GLES2Implementation.danakj2016-03-171-0/+1
| | | | | | | | | | | | | | | | This means calls to any flush or finish methods on GLES2Implementation will update the flush id, and calls to either WebGraphicsContext3D::lastFlushID() or to GLES2Interface::GetLastFlushIdCHROMIUM() will return the same answer always. R=kbr@chromium.org, piman BUG=584497 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel Review URL: https://codereview.chromium.org/1814573002 Cr-Commit-Position: refs/heads/master@{#381647}
* Mojo C++ bindings: MultiplexRouter more aggressively dispatch queued messages.yzshen2016-03-162-13/+8
| | | | | | | | | | | | | | | This CL allows MultiplexRouter to dispatch multiple queued messages to clients without returning to the message loop. This way we may starve other tasks on the same thread, but we have been doing the same thing in the non-associated-interface case (see Connector::ReadAllAvailableMessages). So it is probably okay. BUG=590495 Review URL: https://codereview.chromium.org/1808583003 Cr-Commit-Position: refs/heads/master@{#381514}
* Mojo C++ bindings: introduce mojo::WTFArray.yzshen2016-03-1518-413/+861
| | | | | | | | | | | | mojo::WTFArray is a thin wrapper around WTF::Vector. It is move-only and can express null array. You can move WTF::Vector in/out of mojo::WTFArray. If "--for_blink" is specified for the bindings generator, the generator will map mojo array to mojo::WTFArray BUG=583738 Review URL: https://codereview.chromium.org/1766093002 Cr-Commit-Position: refs/heads/master@{#381265}
* Switch StoragePartitionService interface to use url::Origin instead of mojo ↵jam2016-03-151-1/+1
| | | | | | | | | | string. BUG=586194 Review URL: https://codereview.chromium.org/1798113002 Cr-Commit-Position: refs/heads/master@{#381229}
* Add GYP support for Chrome's mojo manifestrockot2016-03-151-0/+41
| | | | | | | | BUG=None Review URL: https://codereview.chromium.org/1796033002 Cr-Commit-Position: refs/heads/master@{#381193}
* Mojo C++ bindings: fix the for_blink_tests target.Yuzhu Shen2016-03-151-1/+0
| | | | | | | | | | | | It depends on mojo_public_test_support, which is unnecessary and broke blink_platform_unittests in isolated mode. BUG=583738 TBR=rockot@chromium.org Review URL: https://codereview.chromium.org/1800843003 . Cr-Commit-Position: refs/heads/master@{#381164}
* [mojo-sdk] Cache the connector's weak self to avoid a malloc/free on every ↵amistry2016-03-142-3/+7
| | | | | | | | | | incoming message. BUG=None Review URL: https://codereview.chromium.org/1802443002 Cr-Commit-Position: refs/heads/master@{#381100}
* Mojo C++ bindings: support mapping mojo string to WTF::String.yzshen2016-03-1424-43/+467
| | | | | | | | | | The generator now supports a "--for_blink" flag. When it is specified, the generator will map mojo string to WTF::String. BUG=583738 Review URL: https://codereview.chromium.org/1751563002 Cr-Commit-Position: refs/heads/master@{#381091}
* [mojo] Implement pipe fusion APIrockot2016-03-147-1/+91
| | | | | | | | | | | | | | | Sometimes it's desirable to fuse two pipes together. This is particularly useful when a service provides some kind of interface pipe later than its consumers would like to have such a pipe available. Rather than require the service to be rewritten to accommodate such cases, a consumer could create its own disconnected pipe and fuse it lazily with a service endpoint. BUG=591742 Review URL: https://codereview.chromium.org/1785843002 Cr-Commit-Position: refs/heads/master@{#380964}
* Change mojo::Watcher to survive closing a handle and cancelling.sammc2016-03-142-1/+23
| | | | | | | | | | | | | Currently, if a handle is closed while a Watcher is watching it, its callback will notify it that the watch has been cancelled. However, if the Watcher is explicitly cancelled after the handle is closed but before the callback is called, it will attempt to call MojoCancelWatch() on the closed handle and DCHECK that it succeeds. This changes the DCHECK to also accept MOJO_ERROR_INVALID_ARGUMENT. Review URL: https://codereview.chromium.org/1795193005 Cr-Commit-Position: refs/heads/master@{#380936}
* [mojo-sdk] Remove mojo_ignore_result and move C++ macros.h to bindings ↵amistry2016-03-1133-52/+22
| | | | | | | | | | | | internal code. The one macro remaining in macros.h is only used by generated C++ code. BUG=534695 Review URL: https://codereview.chromium.org/1784743003 Cr-Commit-Position: refs/heads/master@{#380556}
* Adds views_mus_unittests to the linux botsky2016-03-111-4/+7
| | | | | | | | | | | | | | | This test has been running on the mojo linux bot for a while now and is stable: https://build.chromium.org/p/chromium.mojo/builders/Chromium%20Mojo%20Linux/ BUG=577274 TEST=bot only change R=dpranke@chromium.org, ben@chromium.org TBR=ben@chromium.org Review URL: https://codereview.chromium.org/1773343002 Cr-Commit-Position: refs/heads/master@{#380550}
* Revert of Reland: Mojo C++ bindings: replace '::' with '.' in the interface ↵yzshen2016-03-113-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | name. (patchset #2 id:20001 of https://codereview.chromium.org/1782543004/ ) Reason for revert: https://uberchromegw.corp.google.com/i/chromium.linux/builders/Android%20Tests%20%28dbg%29/builds/33342 Original issue's description: > Reland: Mojo C++ bindings: replace '::' with '.' in the interface name. > > Previously the |foo::Bar::Name_| field was "foo::Bar". With this change it > becomes "foo.Bar". > > Using C++-style namespace in the name doesn't makes too much sense because the > name should remain the same across different languages. > > The original CL was https://codereview.chromium.org/1778793004/ > > BUG=None > TBR=ben@chromium.org > > Committed: https://crrev.com/a061a917ebc0d16fb67d2644d93bfdca7eec92d3 > Cr-Commit-Position: refs/heads/master@{#380459} TBR=ben@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=None Review URL: https://codereview.chromium.org/1785803003 Cr-Commit-Position: refs/heads/master@{#380503}
* Mojo C++ bindings: remove the utility/ folder.yzshen2016-03-1018-1707/+0
| | | | | | | | BUG=570102 Review URL: https://codereview.chromium.org/1784643002 Cr-Commit-Position: refs/heads/master@{#380472}
* Reland: Mojo C++ bindings: replace '::' with '.' in the interface name.yzshen2016-03-103-4/+3
| | | | | | | | | | | | | | | | | Previously the |foo::Bar::Name_| field was "foo::Bar". With this change it becomes "foo.Bar". Using C++-style namespace in the name doesn't makes too much sense because the name should remain the same across different languages. The original CL was https://codereview.chromium.org/1778793004/ BUG=None TBR=ben@chromium.org Review URL: https://codereview.chromium.org/1782543004 Cr-Commit-Position: refs/heads/master@{#380459}
* [mojo-sdk] Replace assert() usage in bindings with DCHECK.amistry2016-03-106-30/+27
| | | | | | | | BUG=None Review URL: https://codereview.chromium.org/1773403006 Cr-Commit-Position: refs/heads/master@{#380357}
* Revert of Mojo C++ bindings: replace '::' with '.' in the interface name. ↵dpranke2016-03-103-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #3 id:40001 of https://codereview.chromium.org/1778793004/ ) Reason for revert: I think this broke the harness-tests/mojo-helpers.html layout test: https://test-results.appspot.com/dashboards/flakiness_dashboard.html#showExpectations=true&tests=harness-tests%2Fmojo-helpers.html https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux/builds/61800 Original issue's description: > Mojo C++ bindings: replace '::' with '.' in the interface name. > > Previously the |foo::Bar::Name_| field was "foo::Bar". With this change it > becomes "foo.Bar". > > Using C++-style namespace in the name doesn't makes too much sense because the > name should remain the same across different languages. > > BUG=None > > Committed: https://crrev.com/026e10b3842af957773aee40dc3736eecb7faa0c > Cr-Commit-Position: refs/heads/master@{#380301} TBR=ben@chromium.org,yzshen@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=None Review URL: https://codereview.chromium.org/1771353009 Cr-Commit-Position: refs/heads/master@{#380328}
* Mojo C++ bindings: replace '::' with '.' in the interface name.yzshen2016-03-103-4/+3
| | | | | | | | | | | | | | Previously the |foo::Bar::Name_| field was "foo::Bar". With this change it becomes "foo.Bar". Using C++-style namespace in the name doesn't makes too much sense because the name should remain the same across different languages. BUG=None Review URL: https://codereview.chromium.org/1778793004 Cr-Commit-Position: refs/heads/master@{#380301}
* mojo_public_system_perftests: replace mojo::Thread with base::SimpleThread.yzshen2016-03-102-7/+10
| | | | | | | | | | This is a preparation of removing the mojo/public/cpp/utility folder. BUG=570102 Review URL: https://codereview.chromium.org/1779993002 Cr-Commit-Position: refs/heads/master@{#380273}
* Mojo C++ bindings: error notification behavior related to sync calls.yzshen2016-03-094-10/+152
| | | | | | | | | | | | | This CL changes the behavior to: - connection error handler doesn't reenter ongoing sync calls. - connection error handler is delayed until all queued asynchronous messages are processed. BUG=577699 Review URL: https://codereview.chromium.org/1781573004 Cr-Commit-Position: refs/heads/master@{#380259}
* [mojo-bindings] Use Watcher API for JS bindingsrockot2016-03-092-22/+37
| | | | | | | | BUG=592183 Review URL: https://codereview.chromium.org/1777673003 Cr-Commit-Position: refs/heads/master@{#380092}
* Mojo C++ bindings: remove the concept of "GenericInterface".yzshen2016-03-0814-128/+135
| | | | | | | | | | | | | | | | Previously, if a variant Foo1 was generated for mojom interface Foo. Foo1::GenericInterface was defined as a typedef of the non-variant version Foo. This required the non-variant version to be generated and depended on by all variants. The purpose was to make different variants use the same [Associated]Interface{PtrInfo,Request} types. In fact, this is not very useful in real-world use cases. It should be very rare that users need to deal with multiple variants of the same mojom interface in a single same app. This change removes GenericInterface and makes [Associated]Interface{PtrInfo, Request} directly use Foo1 instead of Foo1::GenericInterface. BUG=590329 Review URL: https://codereview.chromium.org/1775613003 Cr-Commit-Position: refs/heads/master@{#379970}
* Remove Mojo bindings environment.Yuzhu Shen2016-03-0837-1803/+4
| | | | | | | | | BUG=585942 R=ben@chromium.org Review URL: https://codereview.chromium.org/1765243002 . Cr-Commit-Position: refs/heads/master@{#379839}
* Mojo C++ bindings: add empty() for Array and Map.yzshen2016-03-084-1/+43
| | | | | | | | BUG=None Review URL: https://codereview.chromium.org/1776583002 Cr-Commit-Position: refs/heads/master@{#379804}
* Treat typemapped kinds as un-cloneabledarin2016-03-082-3/+6
| | | | | | | | BUG=592883 Review URL: https://codereview.chromium.org/1768373003 Cr-Commit-Position: refs/heads/master@{#379789}
* Add an end-to-end, multi-process perftest of using Mojo with the C++ bindings.amistry2016-03-083-0/+203
| | | | | | | | BUG=582823 Review URL: https://codereview.chromium.org/1764023002 Cr-Commit-Position: refs/heads/master@{#379717}
* Fix mojo_public_bindings_perftests and add GN build rules.amistry2016-03-071-4/+8
| | | | | | | | BUG=582823 Review URL: https://codereview.chromium.org/1768883002 Cr-Commit-Position: refs/heads/master@{#379633}
* [mojo-bindings] Use Watch API instead of MessagePumpMojorockot2016-03-078-30/+463
| | | | | | | | | | | | | | | | | | | | | | | This removes the C++ bindings dependency on MessagePumpMojo, consuming the new Watch API instead. For convenience a new mojo::Watcher is added to the public Mojo C++ API library, and this is used by Connector. BUG=590495 R=yzshen@chromium.org TBR=blundell@chromium.org for rename affecting components/message_port.gypi TBR=jam@chromium.org - added a missing header to new url tests Committed: https://crrev.com/d06373e7cd8b4ad725ed5c64c958f2de13585add Cr-Commit-Position: refs/heads/master@{#379402} Committed: https://crrev.com/2cdb2f677c68f06b3bc54cd40f000ab961a09bbb Cr-Commit-Position: refs/heads/master@{#379463} Review URL: https://codereview.chromium.org/1759783003 Cr-Commit-Position: refs/heads/master@{#379508}
* Revert of [mojo-bindings] Use Watch API instead of MessagePumpMojo (patchset ↵Ken Rockot2016-03-068-463/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #12 id:210001 of https://codereview.chromium.org/1759783003/ ) Reason for revert: one more time. mojo_app_tests flake Original issue's description: > [mojo-bindings] Use Watch API instead of MessagePumpMojo > > This removes the C++ bindings dependency on MessagePumpMojo, > consuming the new Watch API instead. > > For convenience a new mojo::Watcher is added to the public > Mojo C++ API library, and this is used by Connector. > > BUG=590495 > R=yzshen@chromium.org > TBR=blundell@chromium.org for rename affecting components/message_port.gypi > TBR=jam@chromium.org - added a missing header to new url tests > > Committed: https://crrev.com/d06373e7cd8b4ad725ed5c64c958f2de13585add > Cr-Commit-Position: refs/heads/master@{#379402} > > Committed: https://crrev.com/2cdb2f677c68f06b3bc54cd40f000ab961a09bbb > Cr-Commit-Position: refs/heads/master@{#379463} TBR=jam@chromium.org,yzshen@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=590495 Review URL: https://codereview.chromium.org/1772503002 . Cr-Commit-Position: refs/heads/master@{#379492}
* [mojo-bindings] Use Watch API instead of MessagePumpMojorockot2016-03-058-30/+463
| | | | | | | | | | | | | | | | | | | | This removes the C++ bindings dependency on MessagePumpMojo, consuming the new Watch API instead. For convenience a new mojo::Watcher is added to the public Mojo C++ API library, and this is used by Connector. BUG=590495 R=yzshen@chromium.org TBR=blundell@chromium.org for rename affecting components/message_port.gypi TBR=jam@chromium.org - added a missing header to new url tests Committed: https://crrev.com/d06373e7cd8b4ad725ed5c64c958f2de13585add Cr-Commit-Position: refs/heads/master@{#379402} Review URL: https://codereview.chromium.org/1759783003 Cr-Commit-Position: refs/heads/master@{#379463}
* Revert of [mojo-bindings] Use Watch API instead of MessagePumpMojo (patchset ↵rockot2016-03-058-463/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #10 id:180001 of https://codereview.chromium.org/1759783003/ ) Reason for revert: Breaks iOS GN which is apparently a tree closer despite having no CQ coverage Original issue's description: > [mojo-bindings] Use Watch API instead of MessagePumpMojo > > This removes the C++ bindings dependency on MessagePumpMojo, > consuming the new Watch API instead. > > For convenience a new mojo::Watcher is added to the public > Mojo C++ API library, and this is used by Connector. > > BUG=590495 > R=yzshen@chromium.org > TBR=blundell@chromium.org for rename affecting components/message_port.gypi > TBR=jam@chromium.org - added a missing header to new url tests > > Committed: https://crrev.com/d06373e7cd8b4ad725ed5c64c958f2de13585add > Cr-Commit-Position: refs/heads/master@{#379402} TBR=jam@chromium.org,yzshen@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=590495 Review URL: https://codereview.chromium.org/1768443004 Cr-Commit-Position: refs/heads/master@{#379406}
* [mojo-bindings] Use Watch API instead of MessagePumpMojorockot2016-03-058-30/+463
| | | | | | | | | | | | | | | | | This removes the C++ bindings dependency on MessagePumpMojo, consuming the new Watch API instead. For convenience a new mojo::Watcher is added to the public Mojo C++ API library, and this is used by Connector. BUG=590495 R=yzshen@chromium.org TBR=blundell@chromium.org for rename affecting components/message_port.gypi TBR=jam@chromium.org - added a missing header to new url tests Review URL: https://codereview.chromium.org/1759783003 Cr-Commit-Position: refs/heads/master@{#379402}
* [mojo-sdk] Remove mojo::ignore_result and MOJO_MOVE_ONLY_TYPEamistry2016-03-0412-96/+13
| | | | | | | | BUG=534695 Review URL: https://codereview.chromium.org/1759393002 Cr-Commit-Position: refs/heads/master@{#379394}
* Remove the remaining Pass() calls from //mojo.yzshen2016-03-0410-18/+18
| | | | | | | | BUG= 557422 Review URL: https://codereview.chromium.org/1767433002 Cr-Commit-Position: refs/heads/master@{#379344}
* [mojo] Add missing Watch/CancelWatch system thunksrockot2016-03-032-1/+21
| | | | | | | | | | | | Needed for Mojo apps to be able to use the new MojoWatch and MojoCancelWatch APIs. BUG=None R=amistry@chromium.org Review URL: https://codereview.chromium.org/1760093002 Cr-Commit-Position: refs/heads/master@{#378962}
* Remove MOJO_ARRAYSIZE and MOJO_WARN_UNUSED_RESULT.amistry2016-03-0310-67/+20
| | | | | | | | BUG=534695 Review URL: https://codereview.chromium.org/1756723003 Cr-Commit-Position: refs/heads/master@{#378935}
* Remove MOJO_DISALLOW_COPY_AND_ASSIGN and MOJO_ALLOW_UNUSED_LOCAL.amistry2016-03-0347-121/+99
| | | | | | | | BUG=534695 Review URL: https://codereview.chromium.org/1755003002 Cr-Commit-Position: refs/heads/master@{#378891}
* Mojo C++ bindings: pass SerializationContext to GetSerializedSize_() and ↵yzshen2016-03-0221-212/+295
| | | | | | | | | | | | | | Serialize_(). The context will be useful for: - WTF::String serialization. We need to create WTF::StringUTF8Adapter objects for non-8-bit WTF::Strings and share them between GetSerializedSize_() and Serialize_(). - adding DCHECKs for sending associated interface pointers/requests over correct message pipe. BUG=583738 Review URL: https://codereview.chromium.org/1752133003 Cr-Commit-Position: refs/heads/master@{#378753}
* Mojo C++ bindings: remove usage of MojoAsyncWaiter from mojo/public/cpp/bindingsyzshen2016-03-0214-185/+88
| | | | | | | | | | | BUG=585942 Committed: https://crrev.com/cb97b6a175c61a3538d724f1214d537b40df573a Cr-Commit-Position: refs/heads/master@{#377652} Review URL: https://codereview.chromium.org/1718363002 Cr-Commit-Position: refs/heads/master@{#378706}
* [mojo-edk] Add MojoWatch and MojoCancelWatch APIsrockot2016-03-021-0/+76
| | | | | | | | | | | This adds MojoWatch() and MojoCancelWatch() APIs to support efficient asynchronous handle event notifications. BUG=590495 Review URL: https://codereview.chromium.org/1748503002 Cr-Commit-Position: refs/heads/master@{#378677}
* Mojo bindings environment: remove usage in gles2.yzshen2016-03-021-6/+4
| | | | | | | | BUG=585942 Review URL: https://codereview.chromium.org/1754683003 Cr-Commit-Position: refs/heads/master@{#378626}