diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-14 21:34:32 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-14 21:34:32 +0000 |
commit | 9d2b5f3b2a8640c6fbb067b16cb22eb0d081568e (patch) | |
tree | 90bb6891dd794d538dcea68e3ba27b0c31fa9fee /chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc | |
parent | 8579b5cac19f736f344fb8354448d469ccaf23ec (diff) | |
download | chromium_src-9d2b5f3b2a8640c6fbb067b16cb22eb0d081568e.zip chromium_src-9d2b5f3b2a8640c6fbb067b16cb22eb0d081568e.tar.gz chromium_src-9d2b5f3b2a8640c6fbb067b16cb22eb0d081568e.tar.bz2 |
Clean up ShortcutsProvider and related classes:
* Move SpansToString()/SpansFromString() and AddLastMatchIfNeeded() from static functions in shortcuts_provider_shortcut.cc to static members on AutocompleteMatch and rename them, to go along with the other existing classification-related functions there, since there's nothing particularly shortcut-related about them.
* Move the definitions of Shortcut and ShortcutMap to the ShortcutsBackend, mainly to "namespace" them -- having a global-scope type named "Shortcut" didn't seem like a good idea. This made sense as a location anyway since the backend already depended heavily on these types.
* Eliminate using statements.
* Modify ShortcutsProviderTest::FillData() so it can be reused in an additional place.
* Shortcut had two different constructors whose function and use was confusing and error-prone -- they took some of the same fields but as different types, and didn't guarantee all the members were initialized. Condense to one constructor which takes the most logical types and sets all members.
* Eliminate ShortcutsBackend::guid_map() (unused).
* Simplify/clarify code.
* Eliminate 2K clamp on shortcut data fields. We don't clamp like this elsewhere, and if the clamp kicks in, it could lead to corrupted results -- e.g. trimming a "description" field but not updating the classifications for that field.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9689085
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126743 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc')
0 files changed, 0 insertions, 0 deletions