Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1331)

Issue 2929953002: Make profile error dialog async (Closed)

Created:
3 years, 6 months ago by xiyuan
Modified:
3 years, 6 months ago
Reviewers:
afakhry, Peter Kasting
CC:
chromium-reviews, tfarina
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Make profile error dialog async So that it does not run a nested message loop to block mojo messages. BUG=729701 Review-Url: https://codereview.chromium.org/2929953002 Cr-Commit-Position: refs/heads/master@{#479389} Committed: https://chromium.googlesource.com/chromium/src/+/2404367d4408db72ffdda3a5d7e520ce9c4f4590

Patch Set 1 #

Patch Set 2 : fix compile #

Patch Set 3 : rebase #

Total comments: 7

Patch Set 4 : for #3 comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+145 lines, -83 lines) Patch
M chrome/browser/ui/android/simple_message_box_android.cc View 1 2 3 2 chunks +10 lines, -5 lines 0 comments Download
M chrome/browser/ui/cocoa/simple_message_box_mac.mm View 1 2 3 2 chunks +10 lines, -5 lines 0 comments Download
M chrome/browser/ui/profile_error_dialog.cc View 1 2 3 3 chunks +32 lines, -23 lines 0 comments Download
M chrome/browser/ui/simple_message_box.h View 1 2 3 2 chunks +10 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/simple_message_box_views.cc View 1 2 3 13 chunks +83 lines, -44 lines 0 comments Download

Messages

Total messages: 34 (25 generated)
xiyuan
3 years, 6 months ago (2017-06-12 16:11:28 UTC) #14
afakhry
lgtm. +pkasting@chromium.org who is the owner of this code.
3 years, 6 months ago (2017-06-12 16:54:38 UTC) #17
Peter Kasting
https://codereview.chromium.org/2929953002/diff/60001/chrome/browser/ui/android/simple_message_box_android.cc File chrome/browser/ui/android/simple_message_box_android.cc (right): https://codereview.chromium.org/2929953002/diff/60001/chrome/browser/ui/android/simple_message_box_android.cc#newcode33 chrome/browser/ui/android/simple_message_box_android.cc:33: std::move(callback).Run(false); I don't understand the function of std::move() in ...
3 years, 6 months ago (2017-06-12 23:54:19 UTC) #20
xiyuan
https://codereview.chromium.org/2929953002/diff/60001/chrome/browser/ui/android/simple_message_box_android.cc File chrome/browser/ui/android/simple_message_box_android.cc (right): https://codereview.chromium.org/2929953002/diff/60001/chrome/browser/ui/android/simple_message_box_android.cc#newcode33 chrome/browser/ui/android/simple_message_box_android.cc:33: std::move(callback).Run(false); On 2017/06/12 23:54:19, Peter Kasting wrote: > I ...
3 years, 6 months ago (2017-06-13 21:49:44 UTC) #22
Peter Kasting
LGTM https://codereview.chromium.org/2929953002/diff/60001/chrome/browser/ui/android/simple_message_box_android.cc File chrome/browser/ui/android/simple_message_box_android.cc (right): https://codereview.chromium.org/2929953002/diff/60001/chrome/browser/ui/android/simple_message_box_android.cc#newcode33 chrome/browser/ui/android/simple_message_box_android.cc:33: std::move(callback).Run(false); On 2017/06/13 21:49:44, xiyuan wrote: > On ...
3 years, 6 months ago (2017-06-14 00:28:56 UTC) #26
xiyuan
On 2017/06/14 00:28:56, Peter Kasting wrote: > LGTM > > https://codereview.chromium.org/2929953002/diff/60001/chrome/browser/ui/android/simple_message_box_android.cc > File chrome/browser/ui/android/simple_message_box_android.cc (right): ...
3 years, 6 months ago (2017-06-14 15:12:57 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2929953002/80001
3 years, 6 months ago (2017-06-14 15:13:33 UTC) #30
commit-bot: I haz the power
Committed patchset #4 (id:80001) as https://chromium.googlesource.com/chromium/src/+/2404367d4408db72ffdda3a5d7e520ce9c4f4590
3 years, 6 months ago (2017-06-14 15:17:43 UTC) #33
xiyuan
3 years, 6 months ago (2017-06-14 15:42:03 UTC) #34
Message was sent while issue was closed.
On 2017/06/14 15:12:57, xiyuan wrote:
> On 2017/06/14 00:28:56, Peter Kasting wrote:
> > LGTM
> > 
> >
>
https://codereview.chromium.org/2929953002/diff/60001/chrome/browser/ui/andro...
> > File chrome/browser/ui/android/simple_message_box_android.cc (right):
> > 
> >
>
https://codereview.chromium.org/2929953002/diff/60001/chrome/browser/ui/andro...
> > chrome/browser/ui/android/simple_message_box_android.cc:33:
> > std::move(callback).Run(false);
> > On 2017/06/13 21:49:44, xiyuan wrote:
> > > On 2017/06/12 23:54:19, Peter Kasting wrote:
> > > > I don't understand the function of std::move() in this statement.  It
> > converts
> > > > an lvalue to an rvalue, but I don't know why that matters.
> > > > 
> > > > This confusion holds for the other files in this CL as well.
> > > 
> > > That is the current syntax to run a OnceClosure/OnceCallback. Doc here
[1].
> > And
> > > one example in [2].
> > > 
> > > [1]:
> > >
> >
>
https://cs.chromium.org/chromium/src/docs/callback.md?rcl=762bb48da4b3ff06e5a...
> > 
> > This doc doesn't really make any note of the move() call and why it's there,
> > though.  Do things not compile without it?  Is it just trying to explicitly
> > state to readers "be aware that .Run() will mutate this"?  I'd really like
> this
> > to be clearer about if this is "preferred" or "necessary", and in either
case
> > why.
> > 
> > Doesn't have to be fixed in this CL, unless you aren't sure of the answer
> either
> > and the code compiles without this, in which case I would hit the pause
button
> > here until we can get a definitive answer.  If you're sure this is needed,
> then
> > proceed, but try to update the docs separately.
> 
> It would not compile without std::move. There are two Callback::Run function
> [1]. The lvalue-reference version could only be called for repating callbacks.
> OnceCallback can only call the rvalue-reference version of Run.
> 
> [1]:
>
https://cs.chromium.org/chromium/src/base/callback.h?rcl=c13482980f289f938644...

For the record, I found it is mentioned in "Running A Callback" section of
callback.md [1]:

  "Note that `OnceCallback::Run` consumes the callback object and can only be
invoked on a callback rvalue."

[1]:
https://cs.chromium.org/chromium/src/docs/callback.md?rcl=762bb48da4b3ff06e5a...

Powered by Google App Engine
This is Rietveld 408576698