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

Issue 9982018: Move most TemplateURL data members to a new struct, TemplateURLData. This allows us to eliminate t… (Closed)

Created:
8 years, 8 months ago by Peter Kasting
Modified:
8 years, 8 months ago
CC:
chromium-reviews, ncarter (slow), creis+watch_chromium.org, akalin, tfarina, dhollowa+watch_chromium.org, brettw-cc_chromium.org, Avi (use Gerrit), ajwong+watch_chromium.org, Raghu Simha, James Su, tim (not reviewing)
Visibility:
Public.

Description

Move most TemplateURL data members to a new struct, TemplateURLData. This allows us to eliminate the TemplateURL NULL constructor, most public non-const TemplateURL functions, and most TemplateURL friend declarations. This is also a necessary precursor to changing TemplateURLService's APIs to convert most "const TemplateURL*" cases to "TemplateURL*", which I'll explain once I actually make the change. There is some awkwardness here around keywords, as keyword autogeneration requires a TemplateURL but the state bits are kept on TemplateURLData. This will go away in the future when I remove keyword autogeneration from TemplateURL entirely. BUG=none TEST=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=131019

Patch Set 1 #

Patch Set 2 : #

Total comments: 12

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1329 lines, -1366 lines) Patch
M chrome/browser/autocomplete/autocomplete_unittest.cc View 1 3 chunks +16 lines, -14 lines 0 comments Download
M chrome/browser/autocomplete/keyword_provider_unittest.cc View 1 1 chunk +5 lines, -5 lines 0 comments Download
M chrome/browser/autocomplete/search_provider.h View 1 1 chunk +6 lines, -1 line 0 comments Download
M chrome/browser/autocomplete/search_provider_unittest.cc View 1 2 chunks +10 lines, -9 lines 0 comments Download
M chrome/browser/importer/firefox2_importer.cc View 1 1 chunk +5 lines, -5 lines 0 comments Download
M chrome/browser/importer/firefox_importer_utils.cc View 1 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/importer/ie_importer.cc View 1 1 chunk +7 lines, -8 lines 0 comments Download
M chrome/browser/importer/profile_import_process_messages.h View 1 2 3 4 2 chunks +61 lines, -58 lines 0 comments Download
M chrome/browser/instant/instant_browsertest.cc View 1 1 chunk +8 lines, -12 lines 0 comments Download
M chrome/browser/policy/configuration_policy_handler.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/protector/default_search_provider_change_browsertest.cc View 1 9 chunks +20 lines, -25 lines 0 comments Download
M chrome/browser/search_engines/search_host_to_urls_map.h View 1 1 chunk +0 lines, -7 lines 0 comments Download
M chrome/browser/search_engines/search_host_to_urls_map.cc View 1 1 chunk +0 lines, -17 lines 0 comments Download
M chrome/browser/search_engines/search_host_to_urls_map_unittest.cc View 1 4 chunks +11 lines, -21 lines 0 comments Download
M chrome/browser/search_engines/search_provider_install_data_unittest.cc View 1 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/browser/search_engines/template_url.h View 1 2 3 3 chunks +160 lines, -174 lines 0 comments Download
M chrome/browser/search_engines/template_url.cc View 1 2 4 chunks +81 lines, -111 lines 0 comments Download
M chrome/browser/search_engines/template_url_fetcher.cc View 1 3 chunks +10 lines, -9 lines 0 comments Download
M chrome/browser/search_engines/template_url_fetcher_unittest.cc View 1 1 chunk +5 lines, -5 lines 0 comments Download
M chrome/browser/search_engines/template_url_parser.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/search_engines/template_url_parser.cc View 1 13 chunks +30 lines, -25 lines 0 comments Download
M chrome/browser/search_engines/template_url_parser_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/search_engines/template_url_prepopulate_data.cc View 1 3 chunks +19 lines, -21 lines 0 comments Download
M chrome/browser/search_engines/template_url_service.h View 1 3 chunks +13 lines, -9 lines 0 comments Download
M chrome/browser/search_engines/template_url_service.cc View 1 27 chunks +136 lines, -127 lines 0 comments Download
M chrome/browser/search_engines/template_url_service_sync_unittest.cc View 1 7 chunks +30 lines, -26 lines 0 comments Download
M chrome/browser/search_engines/template_url_service_unittest.cc View 1 41 chunks +168 lines, -170 lines 0 comments Download
M chrome/browser/search_engines/template_url_unittest.cc View 1 26 chunks +108 lines, -79 lines 0 comments Download
M chrome/browser/search_engines/util.cc View 1 5 chunks +49 lines, -40 lines 0 comments Download
M chrome/browser/sync/test/integration/search_engines_helper.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/test/integration/search_engines_helper.cc View 1 1 chunk +14 lines, -14 lines 0 comments Download
M chrome/browser/sync/test/integration/single_client_search_engines_sync_test.cc View 1 2 chunks +3 lines, -9 lines 0 comments Download
M chrome/browser/sync/test/integration/two_client_search_engines_sync_test.cc View 1 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu.cc View 1 1 chunk +10 lines, -11 lines 0 comments Download
M chrome/browser/ui/cocoa/browser/edit_search_engine_cocoa_controller_unittest.mm View 1 2 3 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/browser/ui/omnibox/omnibox_view_browsertest.cc View 1 3 chunks +15 lines, -18 lines 0 comments Download
M chrome/browser/ui/search_engines/edit_search_engine_controller.cc View 1 3 chunks +8 lines, -12 lines 0 comments Download
M chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc View 1 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/search_engines/search_engine_tab_helper.cc View 1 2 chunks +8 lines, -9 lines 0 comments Download
M chrome/browser/ui/search_engines/template_url_table_model.cc View 1 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/browser/webdata/keyword_table.h View 1 6 chunks +22 lines, -17 lines 0 comments Download
M chrome/browser/webdata/keyword_table.cc View 1 5 chunks +54 lines, -59 lines 0 comments Download
M chrome/browser/webdata/keyword_table_unittest.cc View 1 2 12 chunks +190 lines, -195 lines 0 comments Download
M chrome/browser/webdata/web_data_service.h View 1 5 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/webdata/web_data_service.cc View 1 4 chunks +11 lines, -11 lines 0 comments Download
M chrome/browser/webdata/web_data_service_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
Peter Kasting
sky: review mnissler: policy OWNERS atwilson: sync OWNERS
8 years, 8 months ago (2012-04-04 22:38:40 UTC) #1
Peter Kasting
BTW, just to note, there are some nontrivial changes in a few places to convert ...
8 years, 8 months ago (2012-04-04 22:41:40 UTC) #2
sky
Every looks good, except for chrome/browser/search_engines/template_url_service.cc:1265: . https://chromiumcodereview.appspot.com/9982018/diff/10001/chrome/browser/importer/profile_import_process_messages.h File chrome/browser/importer/profile_import_process_messages.h (right): https://chromiumcodereview.appspot.com/9982018/diff/10001/chrome/browser/importer/profile_import_process_messages.h#newcode197 chrome/browser/importer/profile_import_process_messages.h:197: WriteParam(m, p.short_name); ...
8 years, 8 months ago (2012-04-05 03:42:15 UTC) #3
Mattias Nissler (ping if slow)
lgtm
8 years, 8 months ago (2012-04-05 08:28:06 UTC) #4
Peter Kasting
New snap up. https://chromiumcodereview.appspot.com/9982018/diff/10001/chrome/browser/importer/profile_import_process_messages.h File chrome/browser/importer/profile_import_process_messages.h (right): https://chromiumcodereview.appspot.com/9982018/diff/10001/chrome/browser/importer/profile_import_process_messages.h#newcode197 chrome/browser/importer/profile_import_process_messages.h:197: WriteParam(m, p.short_name); On 2012/04/05 03:42:15, sky ...
8 years, 8 months ago (2012-04-05 19:52:21 UTC) #5
sky
LGTM
8 years, 8 months ago (2012-04-05 20:14:52 UTC) #6
Andrew T Wilson (Slow)
browser/sync LGTM
8 years, 8 months ago (2012-04-05 20:33:28 UTC) #7
nsylvain
Our perf memory tests stopped running around this cl. Do you think it could have ...
8 years, 8 months ago (2012-04-06 14:19:05 UTC) #8
brettw
8 years, 8 months ago (2012-04-06 19:45:33 UTC) #9
I'm definitely hitting a use-after-free of t_url in
TemplateURLService::SaveDefaultSearchProviderToPrefs

Powered by Google App Engine
This is Rietveld 408576698