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

Issue 18618004: Change BrowserThreadDelegate to run Init() async. (Closed)

Created:
7 years, 5 months ago by Maria
Modified:
7 years, 5 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, cbentzel+watch_chromium.org, jam, android-webview-reviews_chromium.org, Kristian Monsen
Visibility:
Public.

Description

Change BrowserThreadDelegate to run Init() async. After this change Init() method will be run as the first task on the thread asynchronously from the UI thread initialization. This allows us to speed up the startup by making IOThread Init() a non-blocking task for the UI. Changes AwUrlRequestContextGetter to create a CookieMonster on UI thread since it needs to happen synchonously. BUG=258231 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=212003

Patch Set 1 #

Total comments: 6

Patch Set 2 : Init and InitAsync #

Total comments: 3

Patch Set 3 : Addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -27 lines) Patch
M android_webview/browser/net/aw_url_request_context_getter.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M android_webview/browser/net/aw_url_request_context_getter.cc View 1 2 2 chunks +17 lines, -15 lines 0 comments Download
M chrome/browser/io_thread.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/io_thread.cc View 1 2 3 chunks +10 lines, -5 lines 0 comments Download
M content/browser/browser_thread_impl.cc View 1 1 chunk +7 lines, -1 line 0 comments Download
M content/public/browser/browser_thread_delegate.h View 1 1 chunk +9 lines, -6 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
Maria
This is re-worked version of the change started in https://codereview.chromium.org/18405007/ and based on the comments ...
7 years, 5 months ago (2013-07-11 20:13:47 UTC) #1
awong
Thanks for continuing with the changes Maria, and for working through the widened scope of ...
7 years, 5 months ago (2013-07-11 20:43:48 UTC) #2
jam
https://codereview.chromium.org/18618004/diff/1/content/browser/browser_thread_impl.cc File content/browser/browser_thread_impl.cc (right): https://codereview.chromium.org/18618004/diff/1/content/browser/browser_thread_impl.cc#newcode109 content/browser/browser_thread_impl.cc:109: base::Bind(&BrowserThreadDelegate::Init, base::Unretained(delegate))); what guarantee do we have now that ...
7 years, 5 months ago (2013-07-11 20:57:13 UTC) #3
Maria
https://codereview.chromium.org/18618004/diff/1/android_webview/browser/aw_browser_context.cc File android_webview/browser/aw_browser_context.cc (right): https://codereview.chromium.org/18618004/diff/1/android_webview/browser/aw_browser_context.cc#newcode90 android_webview/browser/aw_browser_context.cc:90: url_request_context_getter_->InitializeOnUiThread(); I think you are correct that I cannot ...
7 years, 5 months ago (2013-07-11 21:11:36 UTC) #4
awong
On 2013/07/11 21:11:36, Maria wrote: > https://codereview.chromium.org/18618004/diff/1/android_webview/browser/aw_browser_context.cc > File android_webview/browser/aw_browser_context.cc (right): > > https://codereview.chromium.org/18618004/diff/1/android_webview/browser/aw_browser_context.cc#newcode90 > ...
7 years, 5 months ago (2013-07-11 21:33:05 UTC) #5
mkosiba (inactive)
CC Kristian who knows a bit more about our use of the cookie store.
7 years, 5 months ago (2013-07-12 12:36:00 UTC) #6
Maria
Please take another look at this CL. Updated this change to add a new InitAsync() ...
7 years, 5 months ago (2013-07-12 17:53:11 UTC) #7
jam
lgtm
7 years, 5 months ago (2013-07-16 17:52:34 UTC) #8
Kristian Monsen
https://codereview.chromium.org/18618004/diff/29001/android_webview/browser/net/aw_url_request_context_getter.h File android_webview/browser/net/aw_url_request_context_getter.h (right): https://codereview.chromium.org/18618004/diff/29001/android_webview/browser/net/aw_url_request_context_getter.h#newcode62 android_webview/browser/net/aw_url_request_context_getter.h:62: scoped_refptr<net::CookieStore> cookie_store_; It would be nice to be able ...
7 years, 5 months ago (2013-07-16 20:04:09 UTC) #9
joth
lgtm https://codereview.chromium.org/18618004/diff/1/android_webview/browser/net/aw_url_request_context_getter.cc File android_webview/browser/net/aw_url_request_context_getter.cc (right): https://codereview.chromium.org/18618004/diff/1/android_webview/browser/net/aw_url_request_context_getter.cc#newcode103 android_webview/browser/net/aw_url_request_context_getter.cc:103: url_request_context_->set_cookie_store(cookie_store_.get()); url_request_context_->set_cookie_store(cookie_store_.release()) https://codereview.chromium.org/18618004/diff/29001/android_webview/browser/net/aw_url_request_context_getter.h File android_webview/browser/net/aw_url_request_context_getter.h (right): https://codereview.chromium.org/18618004/diff/29001/android_webview/browser/net/aw_url_request_context_getter.h#newcode62 android_webview/browser/net/aw_url_request_context_getter.h:62: ...
7 years, 5 months ago (2013-07-16 20:19:52 UTC) #10
awong
lgtm w/ nit agreed with others about commenting on the cookie store ownership handoff. https://codereview.chromium.org/18618004/diff/29001/chrome/browser/io_thread.h ...
7 years, 5 months ago (2013-07-16 21:21:38 UTC) #11
Maria
Updated based on comments. I chose to go with joth's suggestion and just keep the ...
7 years, 5 months ago (2013-07-16 21:53:03 UTC) #12
joth
aw/ lgtm
7 years, 5 months ago (2013-07-16 23:36:40 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mariakhomenko@chromium.org/18618004/57001
7 years, 5 months ago (2013-07-17 00:54:08 UTC) #14
commit-bot: I haz the power
7 years, 5 months ago (2013-07-17 08:58:45 UTC) #15
Message was sent while issue was closed.
Change committed as 212003

Powered by Google App Engine
This is Rietveld 408576698