Aakalin@chromium.orgRework arguments of HistoryService::AddPage()
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Remove more set noparents BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10824025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148406 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Add a separate protector UMA state when backup is overwritten by migration. Also added a UMA-only prepopulated entry for AVG search. BUG=None TEST=Manual Review URL: https://chromiumcodereview.appspot.com/10695115 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146742 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
When the Google base URL changes and causes keyword updates, save those to the database and send them to sync. Note that even if the database had the wrong keyword, a TemplateURL would get reset to the correct keyword on next load (in the model, not in the database), so this is mostly useful for keeping state as consistent as possible rather than preventing visible local problems. One tricky bit here is that we don't want these sorts of changes to change the keywords of existing URLs in other sync clients, lest we give an entry the wrong keyword for the local environment. I could have dealt with this by never sending such updates to sync at all, but given that remote clients need to deal with these sorts of issues anyway for other reasons (e.g. a user adding a new TemplateURL that uses Google base URLs), it seemed less error-prone to use the standard UpdateNoNotify() functionality and then ensure remote clients handle things correctly. This will also ensure that if we e.g. change the TemplateURL's last_modified date when updating the base URL, that change will get propagated to sync, which is (once again) good for keeping the server and all clients seeing the most consistent state possible. BUG=128249 TEST=none Review URL: https://chromiumcodereview.appspot.com/10458077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140608 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Remove the rest of #pragma once in one big CL. For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
When the Google base URL changes and causes keyword updates, save those to the database and send them to sync. Note that even if the database had the wrong keyword, a TemplateURL would get reset to the correct keyword on next load (in the model, not in the database), so this is mostly useful for keeping state as consistent as possible rather than preventing visible local problems. One tricky bit here is that we don't want these sorts of changes to change the keywords of existing URLs in other sync clients, lest we give an entry the wrong keyword for the local environment. I could have dealt with this by never sending such updates to sync at all, but given that remote clients need to deal with these sorts of issues anyway for other reasons (e.g. a user adding a new TemplateURL that uses Google base URLs), it seemed less error-prone to use the standard UpdateNoNotify() functionality and then ensure remote clients handle things correctly. This will also ensure that if we e.g. change the TemplateURL's last_modified date when updating the base URL, that change will get propagated to sync, which is (once again) good for keeping the server and all clients seeing the most consistent state possible. BUG=128249 TEST=none Review URL: https://chromiumcodereview.appspot.com/10458077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140608 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Remove message_loop_helpers.h and update the includes to point to the new location. Note: This was a TODO for akalin@. This patch was generated by: $ find . -name '*.h' -o -name '*.cc' -o -name '*.mm' | xargs sed -i -e "s/base\/message_loop_helpers.h/base\/sequenced_task_runner_helpers.h/g" R=akalin@chromium.org TBR=willchan@chromium.org,ben@chromium.org,jam@chromium.org,tony@chromium.org Review URL: https://chromiumcodereview.appspot.com/10578026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143174 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Remove the rest of #pragma once in one big CL. For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Remove content->app dependency in template_url_prepopulate_data.cc. This is part of Chrome for Android upstreaming and is needed to link unit_tests successfully. GetCurrentCountryID() on Android was calling TemplateURLPrepopulateData::GetCountryCodeAtInstall() which is implemented internally on the app side. Review URL: https://chromiumcodereview.appspot.com/10697087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145539 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
RefCounted types should not have public destructors, chrome/browser/ part 6 BUG=123295 TEST=none Review URL: http://codereview.chromium.org/10071036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134218 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
RefCounted types should not have public destructors, chrome/browser/ part 6 BUG=123295 TEST=none Review URL: http://codereview.chromium.org/10071036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134218 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Centralize logic around Instant modes. The goal of this change is to have callers go through InstantController to check if it's enabled (in any of a variety of modes), as opposed to checking prefs::kInstantEnabled directly. This is because we plan to add field trials, command-line forced modes and default modes that may cause Instant to be in a given mode regardless of this pref. At the moment however, there's no change in functionality. BUG=none R=pkasting@chromium.org,sky@chromium.org TEST=none; no change in functionality, as the SUGGEST mode is not actually used at the moment. Review URL: https://chromiumcodereview.appspot.com/10879043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154809 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Remove the rest of #pragma once in one big CL. For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Add API key to omnibox's suggest requests Mostly closed question: * Is the api key constant over the length of the run? [pfelding guesses yes. working assumpting is yes. The code for the api keys makes it look like the keys are compiled into the binary. joi to answer for sure.] Closed questions: * Send to all google suggest base URLs or only certain ones? [ANSWERED by afeldman: might as well send to everything] * Send on all protocols or just https? [ANSWERED by afeldman: all protocols] * The way I formatted the suggest URL parameter puts the parameter last in the URL. I think this looks better for people looking at URL. However, given the standard structure in template_url.cc of the way replacement is done, that means we end up with an extra & at the end of the URL. Is that a problem? [RESOLVED by dcblack by moving sugkey parameter into template itself] * Do I have to do anything to update users who already have their template URL instantiated? (I think the answer is no, but I'm asking to double-check.) [ANSWERED by pkasting: increment version number in the prepopulated template URL file] BUG= TEST=tested using wireshark Review URL: https://codereview.chromium.org/10905292 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156956 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
introduce chrome/browser/common directory and move url_database(and its dependencies) This is a copy of https://src.chromium.org/viewvc/chrome?view=rev&revision=157475 c/b/common dir is for utility/library code shared by chrome browser code. BUG=144783 TBR=joi,ben Review URL: https://codereview.chromium.org/10948045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157796 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
base: Remove dereference structure operator (i.e ->) from ScopedVector. BUG=128663 R=brettw@chromium.org,willchan@chromium.org Review URL: https://chromiumcodereview.appspot.com/10669038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145073 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Remove the rest of #pragma once in one big CL. For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Remove the rest of #pragma once in one big CL. For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Cleanup: Constify some ProfileKeyedBaseFactory methods and all overrides. Remove ProfileKeyedBaseFactory::ForceRegisterPrefsForTest() Review URL: https://chromiumcodereview.appspot.com/10908088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155073 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Cleanup: Constify some ProfileKeyedBaseFactory methods and all overrides. Remove ProfileKeyedBaseFactory::ForceRegisterPrefsForTest() Review URL: https://chromiumcodereview.appspot.com/10908088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155073 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Add a Profile* member to TemplateURL. This makes some invocations of ReplaceSearchTerms() a bit less verbose, and will be useful later when UIThreadSearchTermsData starts taking a Profile*. One downside is that there are a number of const_cast<>()s added when we try to access the profile() of a const TemplateURL*. These will all go away soon when TemplateURLService is switched to using "const" much less, so I didn't worry too much about them. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10173001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133483 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Refuse invalid SearchProvider and OSDD suggest URLs; etc. Change SearchProvider::CreateSuggestFetcher: Validate the TemplateURL[Ref] and suggest URL on search. Return NULL early if invalid; this prevents crashes. Change TemplateURLParsingContext::GetTemplateURL: Validate the TemplateURLRefs from OSDDs import. Return NULL early if invalid (don't import bad engines). Return NULL early on TemplateURLParser::Parse error. TODO(followup): Validate existing TemplateURLs in profile data? TODO(followup): Support invalid GURLs that may be valid after replacements. BUG=145852 TEST=Less crashes as reported in bug, import succeeds on [1], fails (no-op) on [2] and [3]... [1] http://ready.to/search/en/?sna=MSW_TEST_SUGGEST&prf=http%3A%2F%2Fsearch.yahoo.com%2Fsearch%3Fei%3D%7BinputEncoding%7D%26amp%3Bfr%3Dcrmas%26amp%3Bp%3D&des=MSW_TEST_SUGGEST&opt=%26lt%3BUrl%20type%3D%26quot%3Bapplication%2Fx-suggestions%2Bjson%26quot%3B%20template%3D%26quot%3Bhttp%3A%2F%2Fff.search.yahoo.com%2Fgossip%3Foutput%3Dfxjson%26amp%3Bcommand%3D%7BsearchTerms%7D%26quot%3B%2F%26gt%3B&in=utf&ou=ono&mod=pn# [2] http://ready.to/search/en/?sna=MSW_TEST_SUGGEST_BADSCHEME&prf=http%3A%2F%2Fsearch.yahoo.com%2Fsearch%3Fei%3D%7BinputEncoding%7D%26amp%3Bfr%3Dcrmas%26amp%3Bp%3D&des=MSW_TEST_SUGGEST_BADSCHEME&opt=%26lt%3BUrl%20type%3D%26quot%3Bapplication%2Fx-suggestions%2Bjson%26quot%3B%20template%3D%26quot%3Bbadscheme%3A%2F%2Fff.search.yahoo.com%2Fgossip%3Foutput%3Dfxjson%26amp%3Bcommand%3D%7BsearchTerms%7D%26quot%3B%2F%26gt%3B&in=utf&ou=ono&mod=pn# [3] http://ready.to/search/en/?sna=MSW_TEST_SUGGEST_BADOPENBRACE&prf=http%3A%2F%2Fsearch.yahoo.com%2Fsearch%3Fei%3D%7BinputEncoding%7D%26amp%3Bfr%3Dcrmas%26amp%3Bp%3D&des=MSW_TEST_SUGGEST_BADOPENBRACE&opt=%26lt%3BUrl%20type%3D%26quot%3Bapplication%2Fx-suggestions%2Bjson%26quot%3B%20template%3D%26quot%3Bhttp%3A%2F%2Fff.search.yahoo.com%2Fgossip%3Foutput%3Dfxjson%26amp%3Bcommand%3D%7BsearchTerms%7D%26amp%3Bfoo%3D%7Bbad%26quot%3B%2F%26gt%3B&in=utf&ou=ono&mod=pn Review URL: https://chromiumcodereview.appspot.com/10908044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155315 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Remove the rest of #pragma once in one big CL. For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Reland r131019: 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. This differs from r131019 in that it fixes a memory error in chrome/browser/search_engines/util.cc:MergeEnginesFromPrepopulateData() where when we updated the vector to contain a new TemplateURL*, we didn't also update |default_search_engine| to point at the new URL if necessary. BUG=none TEST=none TBR=sky,mnissler,atwilson Review URL: https://chromiumcodereview.appspot.com/10021008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131224 0039d316-1c4b-4281-b951-d872f2087c98 | 14 年前 | |
Add API key to omnibox's suggest requests Mostly closed question: * Is the api key constant over the length of the run? [pfelding guesses yes. working assumpting is yes. The code for the api keys makes it look like the keys are compiled into the binary. joi to answer for sure.] Closed questions: * Send to all google suggest base URLs or only certain ones? [ANSWERED by afeldman: might as well send to everything] * Send on all protocols or just https? [ANSWERED by afeldman: all protocols] * The way I formatted the suggest URL parameter puts the parameter last in the URL. I think this looks better for people looking at URL. However, given the standard structure in template_url.cc of the way replacement is done, that means we end up with an extra & at the end of the URL. Is that a problem? [RESOLVED by dcblack by moving sugkey parameter into template itself] * Do I have to do anything to update users who already have their template URL instantiated? (I think the answer is no, but I'm asking to double-check.) [ANSWERED by pkasting: increment version number in the prepopulated template URL file] BUG= TEST=tested using wireshark Review URL: https://codereview.chromium.org/10905292 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156956 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Add a getter for search provider logos. Add locations of "Google" logos to the prepopulated data. BUG=140955 Review URL: https://chromiumcodereview.appspot.com/10828401 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155130 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Add a getter for search provider logos. Add locations of "Google" logos to the prepopulated data. BUG=140955 Review URL: https://chromiumcodereview.appspot.com/10828401 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155130 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Move ui_test_utils::RunMessageLoop to test_utils so that it can be reused by content_browsertests. BUG=90448 Review URL: https://chromiumcodereview.appspot.com/10822030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148514 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Rework arguments of HistoryService::AddPage() In preparation for adding a timestamp to NavigationEntry, explicitly add a time argument to all variants of HistoryService::AddPage(). Make HistoryAddPageArgs a regular struct (i.e., not ref-counted). Add a default constructor for it. Make arguments to AddPage() match HistoryAddPageArgs constructor. Make HistoryBackend::AddPage avoid mutating its parameter. BUG=128449 TBR=joi@chromium.org Review URL: https://codereview.chromium.org/10963018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158063 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
introduce chrome/browser/common directory and move url_database(and its dependencies) This is a copy of https://src.chromium.org/viewvc/chrome?view=rev&revision=157475 c/b/common dir is for utility/library code shared by chrome browser code. BUG=144783 TBR=joi,ben Review URL: https://codereview.chromium.org/10948045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157796 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Cleanup: Constify some ProfileKeyedBaseFactory methods and all overrides. Remove ProfileKeyedBaseFactory::ForceRegisterPrefsForTest() Review URL: https://chromiumcodereview.appspot.com/10908088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155073 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Cleanup: Constify some ProfileKeyedBaseFactory methods and all overrides. Remove ProfileKeyedBaseFactory::ForceRegisterPrefsForTest() Review URL: https://chromiumcodereview.appspot.com/10908088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155073 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Remove the rest of #pragma once in one big CL. For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Ensure that MergeDataAndStartSyncing considers already synced entries when setting the synced DSP. Add a regression test to verify this. BUG=142872 TEST=Ensure that bug 142872 is no longer reproducible. Review URL: https://chromiumcodereview.appspot.com/10831338 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152156 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
When the Google base URL changes and causes keyword updates, save those to the database and send them to sync. Note that even if the database had the wrong keyword, a TemplateURL would get reset to the correct keyword on next load (in the model, not in the database), so this is mostly useful for keeping state as consistent as possible rather than preventing visible local problems. One tricky bit here is that we don't want these sorts of changes to change the keywords of existing URLs in other sync clients, lest we give an entry the wrong keyword for the local environment. I could have dealt with this by never sending such updates to sync at all, but given that remote clients need to deal with these sorts of issues anyway for other reasons (e.g. a user adding a new TemplateURL that uses Google base URLs), it seemed less error-prone to use the standard UpdateNoNotify() functionality and then ensure remote clients handle things correctly. This will also ensure that if we e.g. change the TemplateURL's last_modified date when updating the base URL, that change will get propagated to sync, which is (once again) good for keeping the server and all clients seeing the most consistent state possible. BUG=128249 TEST=none Review URL: https://chromiumcodereview.appspot.com/10458077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140608 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Remove the rest of #pragma once in one big CL. For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Rework arguments of HistoryService::AddPage() In preparation for adding a timestamp to NavigationEntry, explicitly add a time argument to all variants of HistoryService::AddPage(). Make HistoryAddPageArgs a regular struct (i.e., not ref-counted). Add a default constructor for it. Make arguments to AddPage() match HistoryAddPageArgs constructor. Make HistoryBackend::AddPage avoid mutating its parameter. BUG=128449 TBR=joi@chromium.org Review URL: https://codereview.chromium.org/10963018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158063 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Make prepopulated-TemplateURL-de-duper heuristic smarter. Instead of blindly preserving the first URL we get back from the keyword table, use the default search engine, or the URL that matches the prepopulate keyword, only after that falling back to using the lowest ID. BUG=128216 TEST=unit_tests TemplateURLServiceUtilTest.* Review URL: https://chromiumcodereview.appspot.com/10409002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139300 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
A working implementation of AQS (Assisted Query Stats). BUG=132667 TEST=AutocompleteProviderTest::AssistedQueryStats,AutocompleteProviderTest::UpdateAssistedQueryStats, TemplateURLTest::ReplaceAssistedQueryStats, manual testing. Review URL: https://chromiumcodereview.appspot.com/10537154 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143827 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
De-dupe input encodings in TemplateURLs. BUG=134695 TEST=none Review URL: https://chromiumcodereview.appspot.com/10676012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144387 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 | |
Remove the rest of #pragma once in one big CL. For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98 | 13 年前 |