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

Issue 9811022: Misc. small cleanups to minimize TemplateURL refactoring diffs: (Closed)

Created:
8 years, 9 months ago by Peter Kasting
Modified:
8 years, 9 months ago
Reviewers:
sky
CC:
chromium-reviews, dhollowa+watch_chromium.org, James Su
Visibility:
Public.

Description

Misc. small cleanups to minimize TemplateURL refactoring diffs: Non-functional changes: * 0 -> TemplateURLRef::NO_SUGGESTIONS_AVAILABLE * GURL x = GURL(...) -> GURL x(...) * Infobar -> InfoBar * AllSources -> AllBrowserContextsAndSources * Pass a Profile* to SearchProviderInstallData, which it will need for more purposes once UIThreadSearchTermsData takes a Profile* * Add/modify comments * "" -> std::string() * Other trivial changes to minimize diffs Functional changes: * TemplateURLFetcher::RequestDelegate::AddSearchProvider() no longer clears the keyword for a newly-added, explicitly-requested TemplateURL that conflicts with a non-replaceable keyword. This means the conflicting keyword will appear in the dialog box and the box will indicate a conflict. This is mostly to avoid giving a TemplateURL an empty keyword, which will later be made illegal. * TemplateURLFetcher::ScheduleDownload() now expects the provided keyword to be non-NULL for autodetected cases (which was always true already) and ignores the keyword for explicit cases (which only matters to tests, as the actual browser code always passed an empty keyword here anyway). * TemplateURLService::CanReplaceKeyword() now always sets its outparam. This prevents any possible use-without-set on the caller side. * Properly order (expected, actual) * ASSERT -> EXPECT * Construct the TemplateURL for TemplateURLTableModel::Add() in that function rather than the caller. This will make it easier to change TemplateURLs to require a Profile* later. * Check all fields at the end of WebDatabaseMigrationTest.MigrateVersion27ToCurrent BUG=none TEST=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=128270

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+125 lines, -147 lines) Patch
M chrome/browser/autocomplete/autocomplete_edit.cc View 2 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/autocomplete/search_provider_unittest.cc View 8 chunks +22 lines, -16 lines 0 comments Download
M chrome/browser/google/google_url_tracker.h View 3 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/google/google_url_tracker.cc View 4 chunks +6 lines, -7 lines 0 comments Download
M chrome/browser/google/google_url_tracker_unittest.cc View 3 chunks +5 lines, -6 lines 0 comments Download
M chrome/browser/search_engines/search_provider_install_data.h View 1 chunk +1 line, -1 line 2 comments Download
M chrome/browser/search_engines/search_provider_install_data.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/search_engines/search_provider_install_data_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/search_engines/search_provider_install_state_message_filter.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/search_engines/template_url_fetcher.h View 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/search_engines/template_url_fetcher.cc View 5 chunks +12 lines, -27 lines 0 comments Download
M chrome/browser/search_engines/template_url_fetcher_unittest.cc View 1 chunk +7 lines, -9 lines 0 comments Download
M chrome/browser/search_engines/template_url_service.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/search_engines/template_url_service_sync_unittest.cc View 3 chunks +0 lines, -3 lines 0 comments Download
M chrome/browser/search_engines/template_url_service_test_util.h View 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/search_engines/template_url_service_test_util.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/search_engines/template_url_service_unittest.cc View 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/search_engines/template_url_unittest.cc View 3 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/ui/alternate_error_tab_observer.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/search_engines/edit_search_engine_controller.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/search_engines/keyword_editor_controller.cc View 1 chunk +1 line, -6 lines 0 comments Download
M chrome/browser/ui/search_engines/search_engine_tab_helper.cc View 5 chunks +18 lines, -25 lines 0 comments Download
M chrome/browser/ui/search_engines/template_url_table_model.h View 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/ui/search_engines/template_url_table_model.cc View 1 chunk +8 lines, -1 line 0 comments Download
M chrome/browser/ui/views/edit_search_engine_dialog.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/webdata/keyword_table.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/webdata/web_database_migration_unittest.cc View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Peter Kasting
I just lumped these all together because they're mostly super-tiny.
8 years, 9 months ago (2012-03-21 23:03:43 UTC) #1
sky
https://chromiumcodereview.appspot.com/9811022/diff/1/chrome/browser/search_engines/search_provider_install_data.h File chrome/browser/search_engines/search_provider_install_data.h (right): https://chromiumcodereview.appspot.com/9811022/diff/1/chrome/browser/search_engines/search_provider_install_data.h#newcode49 chrome/browser/search_engines/search_provider_install_data.h:49: SearchProviderInstallData(Profile* profile, I would prefer this to keep this ...
8 years, 9 months ago (2012-03-22 00:29:07 UTC) #2
Peter Kasting
https://chromiumcodereview.appspot.com/9811022/diff/1/chrome/browser/search_engines/search_provider_install_data.h File chrome/browser/search_engines/search_provider_install_data.h (right): https://chromiumcodereview.appspot.com/9811022/diff/1/chrome/browser/search_engines/search_provider_install_data.h#newcode49 chrome/browser/search_engines/search_provider_install_data.h:49: SearchProviderInstallData(Profile* profile, On 2012/03/22 00:29:07, sky wrote: > Could ...
8 years, 9 months ago (2012-03-22 18:54:26 UTC) #3
sky
I would prefer the constructor taking n-thread safe objects, then one non-thread safe object. But ...
8 years, 9 months ago (2012-03-22 19:21:00 UTC) #4
sky
8 years, 9 months ago (2012-03-22 19:39:01 UTC) #5
Peter pointed out my comments don't make sense. Sorry about that, LGTM

Powered by Google App Engine
This is Rietveld 408576698