summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing
Commit message (Collapse)AuthorAgeFilesLines
* Finally flip safe-browsing to SafeBrowsingStoreFile.shess@chromium.org2010-09-241-6/+0
| | | | | | | | | | | | | With this, everyone will use SafeBrowsingDatabaseNew with SafeBrowsingStoreFile backing. The database file should be smaller and faster. BUG=28647 TEST=Monitor crash server and histograms. Review URL: http://codereview.chromium.org/3473016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60461 0039d316-1c4b-4281-b951-d872f2087c98
* base: Finish moving the SplitString functions from string_util.h to ↵tfarina@chromium.org2010-09-242-2/+4
| | | | | | | | | | | string_split.h BUG=None TEST=trybos Review URL: http://codereview.chromium.org/3447008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60422 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Move virtual methods to implementation files.erg@google.com2010-09-232-45/+76
| | | | | | | | | | | Remove logging.h and other headers where possible. BUG=none TEST=none Review URL: http://codereview.chromium.org/3461019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60369 0039d316-1c4b-4281-b951-d872f2087c98
* Make SafeBrowsingStoreFile the default store for developers.shess@chromium.org2010-09-231-0/+6
| | | | | | | | | | | Get some early coverage by opting developers into the experiment. BUG=28647 TEST=Developers don't complain. Review URL: http://codereview.chromium.org/3389025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60257 0039d316-1c4b-4281-b951-d872f2087c98
* Short-circuit safe-browsing updates once corruption is detected.shess@chromium.org2010-09-218-31/+487
| | | | | | | | | | | | | | | | | | | | | | | | | The corruption handler posts a task to the current message loop to delete the database after the current task has completed. The older code re-created the database and allowed the transaction to continue, the newer code did not, causing a crash. [The database was deleted first, so on next launch it would not crash again.] This changes the new code to short-circuit storage of further chunks once corruption is detected, until the next update (which will re-create the database as needed). Adding the tests exposed some code paths which weren't quite right. Pulled the lock out of ClearUpdateCaches() because ResetDatabase() calls it with a lock. The corruption handler can delete open databases. Added sanity-check code to SafeBrowsingStoreFile so that it doesn't allocate insane vectors. BUG=55606 TEST=crash in 55606 stops happening, tests green. Review URL: http://codereview.chromium.org/3420015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60128 0039d316-1c4b-4281-b951-d872f2087c98
* Suppress safe-browsing perf logging.shess@chromium.org2010-09-183-14/+13
| | | | | | | | | | | Under SB_DLOG(), so easy to enable for those as wants it back. BUG=none TEST=none Review URL: http://codereview.chromium.org/3389019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59898 0039d316-1c4b-4281-b951-d872f2087c98
* Create test for safebrowsing_test lzheng@chromium.org2010-09-171-0/+0
| | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/3383006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59865 0039d316-1c4b-4281-b951-d872f2087c98
* Add database_update_in_progress_ in SafeBrowsingService to indicate if thelzheng@chromium.org2010-09-093-19/+52
| | | | | | | | | | | | database is still changing. This could be used in the end to end safebrowsing test so we only verify database after this flag is set to false. BUG=none TEST=safe_browsing_browsertest.cc Review URL: http://codereview.chromium.org/3258010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58947 0039d316-1c4b-4281-b951-d872f2087c98
* Relax DCHECK in SafeBrowsingDatabaseNew::CacheHashResults().shess@chromium.org2010-09-091-5/+10
| | | | | | | | | | | | Function is called on the I/O thread rather than the safe-browsing thread. BUG=54726 TEST=Browse to an URL on the malware or phishing list in debug build, no DCHECK. Review URL: http://codereview.chromium.org/3348015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58912 0039d316-1c4b-4281-b951-d872f2087c98
* Add a command line switch "--disable-background-networking", to be used inmbelshe@chromium.org2010-09-081-1/+3
| | | | | | | | | | | | | | | | | benchmarking when unexpected background networking can cause undesired vairance. The following systems are disabled via this flag: - IntranetRedirectDetector (requests randomURLs 2-5s after startup) - GoogleUrlTracker (searchdomaincheck) - SafeBrowsing updater - Extension updater BUG=none TEST=none Review URL: http://codereview.chromium.org/3312014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58892 0039d316-1c4b-4281-b951-d872f2087c98
* Add "?" to query strings if original url has no query string.lzheng@chromium.org2010-09-073-11/+26
| | | | | | | | BUG=none TEST=protocol_manager_unittest.cc Review URL: http://codereview.chromium.org/3244005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58762 0039d316-1c4b-4281-b951-d872f2087c98
* Enable SafeBrowsingDatabaseNew.shess@chromium.org2010-09-043-7/+16
| | | | | | | | | | | | | | | | | | Convert from SafeBrowsingDatabaseBloom to SafeBrowsingDatabaseNew for default database. Shift histograms for SB2.AddPrefixes and SB2.SubPrefixes to the store, because the database can't see the sub count. Enable SB2.FailedUpdate for SafeBrowsingStoreSqlite to match bloom code. BUG=28647 TEST=none Review URL: http://codereview.chromium.org/3320009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58578 0039d316-1c4b-4281-b951-d872f2087c98
* Final fixes for new safe-browsing storage.shess@chromium.org2010-09-027-116/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | In safe_browsing_database.cc, when inserting subs which have no prefixes, calculate the add-chunk based on the entry's chunk, not the sub chunk being processed. This matches the old code. Revise safe_browsing_store* to trim deleted chunks as part of processing rather than as part of reading. This means that more data will be in memory, but it follows the old code, which allowed subs to cancel adds before the add's chunk was deleted. Without this, those subs will stay around until the sub chunk is deleted (because their adds are not seen). In safe_browsing_store_sqlite.cc, the previous code attempted to trick SQLite into writing data efficiently by locking down the old tables while writing the new ones. Due to our use of SQLITE_SECURE_DELETE, this actually resulted in bigger files and more overall I/O. Modify things to simply delete the data, instead. BUG=28647 TEST=none Review URL: http://codereview.chromium.org/3244012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58426 0039d316-1c4b-4281-b951-d872f2087c98
* Fix safe-browsing prefix comparator to sort stably.shess@chromium.org2010-09-011-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | SafeBrowsingDatabaseBloom::PairCompare() compared SBPairs. The prefix part is a 32-bit hash which should be uniformly distributed. The previous code used a trick of subtracting the prefixes and returning the result. If arg1<arg2, that resulted in a negative return value, if arg1>arg2, positive, if ==, zero. Since the distribution was uniform, 1/4 of prefix comparisons gave incorrect results, which caused qsort() and bsearch() gave incorrect results. In practice, this caused some add prefixes to remain in the database when their opposite sub prefixes were present. Most of these would be gone after a few updates (as items were added or removed, the sort within a chunk would change, allowing more matches to occur). The excess add prefixes may have resulted in excess queries up to the servers, but should not have resulted in false misses (sites escaping the filter). BUG=none TEST=none Review URL: http://codereview.chromium.org/3284011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58172 0039d316-1c4b-4281-b951-d872f2087c98
* Move Google-specific code under browser/ into browser/google/.evan@chromium.org2010-08-302-2/+2
| | | | | | | | | BUG=50548 TEST=compiles Review URL: http://codereview.chromium.org/3280008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57922 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor version-getting info into a chrome::VersionInfo object.evan@chromium.org2010-08-271-4/+3
| | | | | | | | | | | | | | | I was trying to replace wstring usage in base::FileVersionInfo, but that class is rather Windows-specific with strange fields like "private_build()" where the value and encoding aren't clear. 95% of the users of FileVersionInfo actually just care about the current Chrome version, so we can provide a much simpler interface for them. We still use FileVersionInfo for retrieving information from e.g. plugin DLLs, but in those cases the usage is clearer. Review URL: http://codereview.chromium.org/3135028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57725 0039d316-1c4b-4281-b951-d872f2087c98
* Move prefs-related files under chrome/browser/ into a prefs/ subdir.evan@chromium.org2010-08-261-1/+1
| | | | | | | | | | | | Rename includes, resort header include order in places where the rename changed the order. BUG=50548 TEST=compiles Review URL: http://codereview.chromium.org/3203008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57434 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Minor cleanup to testing headers.erg@google.com2010-08-251-0/+2
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3136014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57345 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Move individual XXXMsg_Params structs to a new file.erg@google.com2010-08-241-0/+1
| | | | | | | | | | | | | | | | The new file, render_messages_params.h, is included in 57 files, while render_messages.h is included in 176 files. Moving the Params structs to their own file allow pruning the included headers. (Part 2 of this cleanup will be sorting the individual structs into themes to further minimize header inclusion.) BUG=51411 TEST=compiles Review URL: http://codereview.chromium.org/3119035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57229 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up unnecessary #includes of base/{scoped_ptr.h,string16.h}.viettrungluu@chromium.org2010-08-194-1/+3
| | | | | | | | | | | | Also fix a bunch of #includes. Folks, scoped_refptr<> is defined in base/ref_counted.h, not in base/scoped_ptr.h. BUG=none TEST=builds Review URL: http://codereview.chromium.org/3132024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56712 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unneeded headers from base/ (part 6)thestig@chromium.org2010-08-193-1/+6
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3093013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56641 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor SafeBrowsingDatabase for transition to new file format.shess@chromium.org2010-08-189-223/+2112
| | | | | | | | | | | | | | | | | | | | | | | | Refactor old SafeBrowsingDatabase code to allow for transitioning from the old SQLite-based store to a new SQLite-based store, and from there to the final raw file-based store. The intended rollout is: - Rollout with SafeBrowsingDatabaseBloom (basically the old code). - Rollout SafeBrowsingDatabase+SafeBrowsingStoreSqlite. This changes much of the code, but not the file format, so revert is possible without resync'ing everyone's store (unless the stores have been corrupted or something). - Rollout SafeBrowsingDatabase+SafeBrowsingStoreFile. This changes the file format while the control code stays the same. Revert requires resync. - Rollout a big cleanup which removes dead code. BUG=28647 TEST=Safe browsing continues to work. Review URL: http://codereview.chromium.org/3141009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56592 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the urls reported as page_url and referer_url when a redirect is involved.panayiotis@google.com2010-08-182-4/+29
| | | | | | | | | Bug=None Test=Manually verified with sites redirecting to malware. Review URL: http://codereview.chromium.org/3151018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56583 0039d316-1c4b-4281-b951-d872f2087c98
* Incrementally bring SafeBrowsingDatabaseTest into the modern age.shess@chromium.org2010-08-171-53/+41
| | | | | | | | | | | Use ScopedTempDir, and don't CHECK in tests. BUG=none TEST=waterfall. Review URL: http://codereview.chromium.org/3127007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56397 0039d316-1c4b-4281-b951-d872f2087c98
* Remove deprecated wstring Get(As)String() methods from Value, etc.viettrungluu@chromium.org2010-08-161-48/+51
| | | | | | | | | BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3117017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56187 0039d316-1c4b-4281-b951-d872f2087c98
* Report malware redirectors as well.panayiotis@google.com2010-08-125-23/+37
| | | | | | | | BUG=none TEST=unit_tests Review URL: http://codereview.chromium.org/3028040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55966 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unneeded headers from base/ (part 5)thestig@chromium.org2010-08-071-0/+2
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3041049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55349 0039d316-1c4b-4281-b951-d872f2087c98
* Minor header cleanup of chrome/browser/[st]*/*.h minus c/b/sync/*.h.viettrungluu@chromium.org2010-08-067-13/+4
| | | | | | | | | | | | - Remove unnecessary forward decls. - Remove unnecessary inclusions of <set>, <map>, <vector>, <list>. BUG=none TEST=builds Review URL: http://codereview.chromium.org/3023043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55222 0039d316-1c4b-4281-b951-d872f2087c98
* Remove GetSwitchValue() from chrome/* where easy.evan@chromium.org2010-08-061-2/+3
| | | | | | Review URL: http://codereview.chromium.org/3057033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55176 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 55138 - Full end to end test using safebrowsing test server suite.lzheng@chromium.org2010-08-051-394/+31
| | | | | | | | | Review URL: http://codereview.chromium.org/3032008 TBR=lzheng@google.com Review URL: http://codereview.chromium.org/3027044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55139 0039d316-1c4b-4281-b951-d872f2087c98
* Full end to end test using safebrowsing test server suite.lzheng@google.com2010-08-051-31/+394
| | | | | | Review URL: http://codereview.chromium.org/3032008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55138 0039d316-1c4b-4281-b951-d872f2087c98
* base: rename Environment::HasEnv to Environment::HasVar.tfarina@chromium.org2010-08-041-1/+1
| | | | | | | | | | | | This is the part 2 of this series. More two comming. Splitting this into small parts, so it is more easy to review and reduce the size of the CL. BUG=None TEST=trybots Review URL: http://codereview.chromium.org/3035050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54996 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Remove GetSwitchValue() from chrome/* where easy."evan@chromium.org2010-08-041-3/+2
| | | | | | | | This reverts commit r54966. Meant to try it, not commit it, sorry everyone. :( git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54969 0039d316-1c4b-4281-b951-d872f2087c98
* Remove GetSwitchValue() from chrome/* where easy.evan@chromium.org2010-08-041-2/+3
| | | | | | Review URL: http://codereview.chromium.org/3057033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54966 0039d316-1c4b-4281-b951-d872f2087c98
* Build fix.evan@chromium.org2010-08-041-5/+5
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54863 0039d316-1c4b-4281-b951-d872f2087c98
* Remove usage of GetSwitchValue for most of chrome/browser/.evan@chromium.org2010-08-041-12/+13
| | | | | | Review URL: http://codereview.chromium.org/3005053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54856 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the Windows build.brettw@chromium.org2010-08-031-7/+11
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54758 0039d316-1c4b-4281-b951-d872f2087c98
* base: Rename EnvVarGetter to Environment.tfarina@chromium.org2010-08-031-2/+2
| | | | | | | | | | | | | | | Now EnvVarGetter do much more than getting environment variables. Per suggestion from Pawel in http://codereview.chromium.org/3043018/. BUG=None TEST=trybots Signed-off-by: Thiago Farina <tfarina@chromium.org> Review URL: http://codereview.chromium.org/3052034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54696 0039d316-1c4b-4281-b951-d872f2087c98
* Convert more callers of the integer/string functions to usingbrettw@chromium.org2010-07-311-2/+3
| | | | | | | | | | string_number_conversions.h TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3013046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54454 0039d316-1c4b-4281-b951-d872f2087c98
* Add undeclared virtual destructors part 3ziadh@chromium.org2010-07-302-2/+2
| | | | | | | | | | | | | | | | Preventative maintenance for abstract classes that do not declare virtual destructors. Base classes that do not declare their destructors as virtual could potentially lead to memory leaks. These files were discovered using the -Wnon-virtual-dtor flag in g++. r=jar BUG=47469 Review URL: http://codereview.chromium.org/3072010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54373 0039d316-1c4b-4281-b951-d872f2087c98
* Move the number conversions from string_util to a new file.brettw@chromium.org2010-07-301-1/+2
| | | | | | | | | | | | | Use the base namespace in the new file. Update callers. I removed all wstring variants and also the string->number ones that ignore the return value. That encourages people to write code and forget about error handling. TEST=included unit tests BUG=none Review URL: http://codereview.chromium.org/3056029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54355 0039d316-1c4b-4281-b951-d872f2087c98
* base/ header cleanup. Forward declaration instead of including.erg@google.com2010-07-281-0/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3068004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53969 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-2613-0/+13
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Break another common->app dependency.thestig@chromium.org2010-07-201-2/+2
| | | | | | | | BUG=46666 TEST=none Review URL: http://codereview.chromium.org/3007008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53113 0039d316-1c4b-4281-b951-d872f2087c98
* Remove <iostream> where possible.erg@google.com2010-07-201-1/+0
| | | | | | | | | | | | | <iostream> creates a static initializer. Most people don't need <iostream> anyway--they really need <ostream> for operator<< overloads. <iostream> should *never* be included in a header file; <iosfwd> exists for that purpose. BUG=none TEST=none Review URL: http://codereview.chromium.org/3014015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53083 0039d316-1c4b-4281-b951-d872f2087c98
* First change to add safebrowsing service test. lzheng@chromium.org2010-07-163-0/+198
| | | | | | | | | | | | | | Right now, the test only launch the browser and makes sure no auto update is scheduled. Later, the test suite server will be launched within the test and requests will be issued, BUG=47318 TEST=this is the test. Review URL: http://codereview.chromium.org/2845035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52719 0039d316-1c4b-4281-b951-d872f2087c98
* Attempt four at landing the "histogram.h removed from message_loop.h" patch.erg@chromium.org2010-07-151-0/+1
| | | | | | | | | | | | | | Previously committed as r52349 and r52336. Related commits: r52367, r52364 and r52343. Rerunning trybots due to previous trybot breakage. TEST=none BUG=none Review URL: http://codereview.chromium.org/2965015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52496 0039d316-1c4b-4281-b951-d872f2087c98
* Moved InitNavigationParams to test_render_view_host so that other test can ↵oshima@chromium.org2010-07-141-21/+1
| | | | | | | | | | | | | | use it. Added PageTransitionType to argument to make it more general but I can revert this if you think this should not be changed. let me know. BUG=none TEST=none Review URL: http://codereview.chromium.org/2945015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52389 0039d316-1c4b-4281-b951-d872f2087c98
* Revert everything related to the relanding.erg@chromium.org2010-07-141-1/+0
| | | | | | Review URL: http://codereview.chromium.org/2982009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52367 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r52336.erg@chromium.org2010-07-141-0/+1
| | | | | | | | | | | | | | (I accidentally committed a previous version of the patch (the fixed version was in codereview since I had switched to my mac to address this exact compile failure.) BUG=none TEST=none TBR=evan Review URL: http://codereview.chromium.org/2937010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52349 0039d316-1c4b-4281-b951-d872f2087c98