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

Issue 8113018: [web-ui] Migrate RegisterMessageCallback usage to base::bind(). (Closed)

Created:
9 years, 2 months ago by csilv
Modified:
9 years, 1 month ago
Reviewers:
James Hawkins
CC:
chromium-reviews, asanka, hclam+watch_chromium.org, tbarzic+watch_chromium.org, nkostylev+watch_chromium.org, rharrison, ddorwin+watch_chromium.org, fischman+watch_chromium.org, achuith+watch_chromium.org, Paweł Hajdan Jr., acolwell+watch_chromium.org, Randy Smith (Not in Mondays), annacc+watch_chromium.org, yoshiki+watch_chromium.org, ajwong+watch_chromium.org, vrk (LEFT CHROMIUM), scherkus (not reviewing)
Visibility:
Public.

Description

[web-ui] Migrate RegisterMessageCallback usage to base::bind(). (This is a redo of http://codereview.chromium.org/8122004/ which was reverted. CrOS breakage has been fixed and will be confirmed by green trybots.) BUG=98478 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=103840

Patch Set 1 #

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+373 lines, -193 lines) Patch
M chrome/browser/ui/webui/active_downloads_ui.cc View 2 chunks +14 lines, -7 lines 0 comments Download
M chrome/browser/ui/webui/bug_report_ui.cc View 2 chunks +15 lines, -7 lines 0 comments Download
M chrome/browser/ui/webui/certificate_viewer.cc View 2 chunks +8 lines, -6 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc View 2 chunks +7 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc View 2 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc View 2 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/login/eula_screen_handler.cc View 2 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/login/network_dropdown_handler.cc View 1 2 chunks +10 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc View 2 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc View 2 chunks +32 lines, -17 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/login/update_screen_handler.cc View 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.cc View 2 chunks +11 lines, -10 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc View 2 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/register_page_ui.cc View 2 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc View 2 chunks +14 lines, -6 lines 0 comments Download
M chrome/browser/ui/webui/collected_cookies_ui_delegate.cc View 2 chunks +10 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/constrained_html_ui.cc View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/cookies_tree_model_adapter.cc View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/crashes_ui.cc View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/downloads_dom_handler.cc View 2 chunks +26 lines, -15 lines 0 comments Download
M chrome/browser/ui/webui/flags_ui.cc View 2 chunks +8 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/flash_ui.cc View 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/gpu_internals_ui.cc View 2 chunks +9 lines, -6 lines 0 comments Download
M chrome/browser/ui/webui/history2_ui.cc View 2 chunks +11 lines, -5 lines 0 comments Download
M chrome/browser/ui/webui/history_ui.cc View 2 chunks +11 lines, -5 lines 0 comments Download
M chrome/browser/ui/webui/html_dialog_ui.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/hung_renderer_dialog.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/media/media_internals_handler.cc View 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/print_preview_handler.cc View 2 chunks +32 lines, -15 lines 0 comments Download
M chrome/browser/ui/webui/quota_internals_handler.cc View 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/sessions_ui.cc View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/sync_setup_handler.cc View 2 chunks +18 lines, -9 lines 0 comments Download
M chrome/browser/ui/webui/task_manager_handler.cc View 2 chunks +10 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/textfields_ui.cc View 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/tracing_ui.cc View 2 chunks +21 lines, -20 lines 0 comments Download
M chrome/browser/ui/webui/web_ui_browsertest.cc View 2 chunks +14 lines, -8 lines 0 comments Download
M chrome/browser/ui/webui/web_ui_test_handler.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/workers_ui.cc View 2 chunks +4 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
csilv
+jhawkins for review
9 years, 2 months ago (2011-10-04 01:35:46 UTC) #1
James Hawkins
LGTM
9 years, 2 months ago (2011-10-04 01:37:29 UTC) #2
achuithb
I'm not sure base::Unretained is correct here (even though it's effectively what the previous code ...
9 years, 1 month ago (2011-11-22 23:30:00 UTC) #3
James Hawkins
On 2011/11/22 23:30:00, achuith.bhandarkar wrote: > I'm not sure base::Unretained is correct here (even though ...
9 years, 1 month ago (2011-11-22 23:34:42 UTC) #4
achuithb
On 2011/11/22 23:34:42, James Hawkins wrote: > On 2011/11/22 23:30:00, achuith.bhandarkar wrote: > > I'm ...
9 years, 1 month ago (2011-11-22 23:38:29 UTC) #5
csilv
On 2011/11/22 23:38:29, achuith.bhandarkar wrote: > On 2011/11/22 23:34:42, James Hawkins wrote: > > On ...
9 years, 1 month ago (2011-11-23 00:41:16 UTC) #6
achuithb
9 years, 1 month ago (2011-11-23 00:43:25 UTC) #7
On 2011/11/23 00:41:16, csilv wrote:
> On 2011/11/22 23:38:29, achuith.bhandarkar wrote:
> > On 2011/11/22 23:34:42, James Hawkins wrote:
> > > On 2011/11/22 23:30:00, achuith.bhandarkar wrote:
> > > > I'm not sure base::Unretained is correct here (even though it's
> effectively
> > > what
> > > > the previous code did). I think weak ptr should probably be used?
> > > 
> > > Is this in reference to a particular file:line?
> > 
> > I think all the files received the same treatment - I looked at
> > network_screen_handler.cc, imageburner_ui.cc, user_image_screen_handler.cc.
> > 
> > Is there a guarantee that the callback registered with
RegisterMessageCallback
> > will not come after the handler has been destroyed?
> 
> Yes, this is guaranteed.  The callbacks are invoked only by the WebUI object
> (see WebUI::OnWebUISend).  The WebUI object holds the handlers for the page,
and
> will delete the handlers only when the WebUI object itself is deleted.

Great! Thanks!

Powered by Google App Engine
This is Rietveld 408576698