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

Issue 10993064: Make using WebContentsUserData simpler. (Closed)

Created:
8 years, 2 months ago by Avi (use Gerrit)
Modified:
8 years, 2 months ago
CC:
chromium-reviews, jam, dhollowa+watch_chromium.org, browser-components-watch_chromium.org, stuartmorgan+watch_chromium.org, ajwong+watch_chromium.org, rouslan+watch_chromium.org, cbentzel+watch_chromium.org, kkania, joi+watch-content_chromium.org, marja+watch_chromium.org, darin-cc_chromium.org, gbillock+watch_chromium.org, tim (not reviewing), groby+watch_chromium.org, creis+watch_chromium.org, Raghu Simha, haitaol1, mihaip-chromium-reviews_chromium.org, akalin, Aaron Boodman, robertshield, smckay+watch_chromium.org
Visibility:
Public.

Description

Make using WebContentsUserData simpler. BUG=107201 TEST=no visible change Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=159158

Patch Set 1 #

Patch Set 2 : macro awesomeness #

Patch Set 3 : rebase #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -83 lines) Patch
M chrome/browser/automation/automation_tab_helper.h View 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/automation/automation_tab_helper.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/captive_portal/captive_portal_tab_helper.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/captive_portal/captive_portal_tab_helper.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/common/web_contents_user_data.h View 1 2 2 chunks +19 lines, -5 lines 4 comments Download
M chrome/browser/common/web_contents_user_data_unittest.cc View 1 2 chunks +2 lines, -8 lines 0 comments Download
M chrome/browser/extensions/api/web_navigation/web_navigation_api.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/web_navigation/web_navigation_api.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/tab_helper.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/extensions/tab_helper.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/external_protocol/external_protocol_observer.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/external_protocol/external_protocol_observer.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/net/load_time_stats.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/net/load_time_stats.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/omnibox_search_hint.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/omnibox_search_hint.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/pepper_broker_observer.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/pepper_broker_observer.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/plugins/plugin_observer.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/plugins/plugin_observer.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/printing/print_preview_message_handler.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/printing/print_preview_message_handler.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/printing/print_view_manager.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/printing/print_view_manager.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sessions/session_tab_helper.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/sessions/session_tab_helper.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ssl/ssl_tab_helper.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ssl/ssl_tab_helper.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/tab_contents/navigation_metrics_recorder.h View 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/tab_contents/navigation_metrics_recorder.cc View 1 1 chunk +1 line, -1 line 0 comments Download
D chrome/browser/tab_contents/web_contents_user_data.h View 1 chunk +0 lines, -8 lines 0 comments Download
M chrome/browser/ui/alternate_error_tab_observer.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/alternate_error_tab_observer.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/blocked_content/blocked_content_tab_helper.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/bookmarks/bookmark_tab_helper.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/bookmarks/bookmark_tab_helper.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/hung_plugin_tab_helper.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/hung_plugin_tab_helper.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/intents/web_intent_picker_controller.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/intents/web_intent_picker_controller.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/metro_pin_tab_helper.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/metro_pin_tab_helper.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/pdf/pdf_tab_helper.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/pdf/pdf_tab_helper.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/sad_tab_helper.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/sad_tab_helper.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/search/search_tab_helper.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/search/search_tab_helper.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/search_engines/search_engine_tab_helper.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/search_engines/search_engine_tab_helper.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/snapshot_tab_helper.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/snapshot_tab_helper.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/sync/one_click_signin_helper.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/sync/one_click_signin_helper.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/tab_contents/core_tab_helper.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/tab_contents/core_tab_helper.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/zoom/zoom_controller.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/zoom/zoom_controller.cc View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 11 (0 generated)
Avi (use Gerrit)
WDYT? This simplifies the .h files by moving the key declaration into the template, but ...
8 years, 2 months ago (2012-09-27 18:43:28 UTC) #1
Avi (use Gerrit)
Look at chrome/browser/common/web_contents_user_data.h and its unit test to see what I mean.
8 years, 2 months ago (2012-09-27 18:45:04 UTC) #2
sky
The template syntax makes it more obscure, but I like not having the member in ...
8 years, 2 months ago (2012-09-27 20:38:15 UTC) #3
Avi (use Gerrit)
On 2012/09/27 20:38:15, sky wrote: > The template syntax makes it more obscure, but I ...
8 years, 2 months ago (2012-09-27 20:41:04 UTC) #4
sky
I like the macro as it makes it clear where the member is used. It ...
8 years, 2 months ago (2012-09-27 20:50:37 UTC) #5
Avi (use Gerrit)
On 2012/09/27 20:50:37, sky wrote: > I like the macro as it makes it clear ...
8 years, 2 months ago (2012-09-27 21:03:46 UTC) #6
sky
LGTM
8 years, 2 months ago (2012-09-27 21:10:00 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/avi@chromium.org/10993064/7001
8 years, 2 months ago (2012-09-27 21:18:40 UTC) #8
commit-bot: I haz the power
Change committed as 159158
8 years, 2 months ago (2012-09-27 23:52:44 UTC) #9
awong
sorry for the late comments. I like the idea, but the reliance on VC's linker ...
8 years, 2 months ago (2012-10-10 17:03:46 UTC) #10
Avi (use Gerrit)
8 years, 2 months ago (2012-10-10 18:18:53 UTC) #11
That what is FUD?

The WCUD unittest ensures that it works properly. If you add "const" to the key,
the unittest fails with VS. If you use the constructor as a key, the unittest
fails with VS.

https://codereview.chromium.org/10993064/diff/7001/chrome/browser/common/web_...
File chrome/browser/common/web_contents_user_data.h (right):

https://codereview.chromium.org/10993064/diff/7001/chrome/browser/common/web_...
chrome/browser/common/web_contents_user_data.h:46: 
On 2012/10/10 17:03:46, awong wrote:
> Can this be private?

I don't know. Let me try. I'd be happy if it were.

https://codereview.chromium.org/10993064/diff/7001/chrome/browser/common/web_...
chrome/browser/common/web_contents_user_data.h:53: // will be collapsed by the
Visual Studio linker.
I wish I knew. I'm trying to remember who I had the conversation with who said
that this made it work. This also helps with the component builds to ensure that
it's single.

Powered by Google App Engine
This is Rietveld 408576698