summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing
Commit message (Collapse)AuthorAgeFilesLines
* WebUI: Move chrome/browser/dom_ui/ to chrome/browser/webui/.tfarina@chromium.org2011-02-221-3/+3
| | | | | | | | | | | | | To reduce the size of this change I've left stub header files in chrome/browser/dom_ui/. I'll updated the references and delete the stub files later. BUG=59945, 59946 TEST=trybots Review URL: http://codereview.chromium.org/6538075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75660 0039d316-1c4b-4281-b951-d872f2087c98
* Intergration of the client-side phishing detection.noelutz@google.com2011-02-176-14/+547
| | | | | | | | | | | | | | | If the client-side phishing detection classifies a page as phishing it will send back a ping to Google to verify whether or not the page is really phishing. If the server also classifies the site as phishing we may show a phishing interstitial if it is enabled. BUG= TEST= Review URL: http://codereview.chromium.org/6014003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75299 0039d316-1c4b-4281-b951-d872f2087c98
* Make TabContentsObserver handle registration automatically, as well as ↵jam@chromium.org2011-02-173-12/+5
| | | | | | | | exposing getters for TC, routing_id, and sending messages. Review URL: http://codereview.chromium.org/6537004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75226 0039d316-1c4b-4281-b951-d872f2087c98
* Fix uninitialized start time in queued safe-browsing checks.shess@chromium.org2011-02-162-13/+16
| | | | | | | | | | | | | | | | While loading the database, checks can be queued. After loading the database, the time-in-queue is histogrammed, but the start time was never initialized, so the histogram could fail a DCHECK(). Also convert base::Time usage to base::TimeTicks, so that time never flows backwards. BUG=73072 TEST=none Review URL: http://codereview.chromium.org/6528051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75190 0039d316-1c4b-4281-b951-d872f2087c98
* Grab additional malware details from the renderer: frame hierarchy, list of ↵panayiotis@google.com2011-02-166-45/+358
| | | | | | | | | scripts and embed urls from each frame. TEST=unit_tests, relevant browser_test Review URL: http://codereview.chromium.org/6373014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75155 0039d316-1c4b-4281-b951-d872f2087c98
* Lookup hash prefix in safebrowsing service.lzheng@chromium.org2011-02-1613-180/+457
| | | | | | | | | | | | To achieve that, added an interface in safe browsing database and safe browsing service. TEST=safe_browsing_service_browsertest, safe_browsing_util_unittest, safe_browsing_database_unittest BUG=60822 Review URL: http://codereview.chromium.org/6299007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75049 0039d316-1c4b-4281-b951-d872f2087c98
* More test out-of-lining.erg@google.com2011-02-142-0/+3
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/6484043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74879 0039d316-1c4b-4281-b951-d872f2087c98
* Add caching to phishing client side detection.gcasto@chromium.org2011-02-143-22/+224
| | | | | | | | | BUG=None TEST=Ran client_side_detection_service_unittest Review URL: http://codereview.chromium.org/6374017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74874 0039d316-1c4b-4281-b951-d872f2087c98
* Safe-browsing download update inverted flag on histogram.shess@chromium.org2011-02-141-4/+4
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6500007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74833 0039d316-1c4b-4281-b951-d872f2087c98
* Run pre-classification checks in the browser before starting client-side ↵bryner@chromium.org2011-02-113-1/+197
| | | | | | | | | | | | | | | | | phishing detection. This CL just adds a framework for running these checks, and adjusts the renderer-side logic to delay phishing classification until the browser has sent an IPC signaling that it should run. Future CL's will add the actual checks, which will include a whitelist lookup, intranet hostname checks, and per-day ping limit. BUG=none TEST=updated existing tests Review URL: http://codereview.chromium.org/6398001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74698 0039d316-1c4b-4281-b951-d872f2087c98
* [cros] Enable disk IO restriction on IOThread.nkostylev@chromium.org2011-02-111-1/+7
| | | | | | | | | | | Mark safe_browsing_thread_ as safe for thread join on shutdown. BUG=chromium:60211, chromium:72696 TEST=bots Review URL: http://codereview.chromium.org/6476033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74618 0039d316-1c4b-4281-b951-d872f2087c98
* Retrieve the redirect urls for the malicious url, and send them in the ↵lzheng@chromium.org2011-02-104-7/+81
| | | | | | | | | | | | | detailed malware report. Contributed by kewang@google.com BUG=60831 TEST=Unit_tests. Review URL: http://codereview.chromium.org/6386004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74525 0039d316-1c4b-4281-b951-d872f2087c98
* PrefixSet as an alternate to BloomFilter for safe-browsing.shess@chromium.org2011-02-105-0/+379
| | | | | | | | | | | | | | | | | | | The safe-browsing prefix data is uniformly distributed across the 32-bit integer space. When sorted, the average delta between items is about 8,000, which can be encoded in a 16-bit integer. PrefixSet takes advantage of this to compress the prefixes into a structure which is relatively efficient to query. The current CL adds the new structure, but continues to use the bloom filter to control things. Histograms are logged to track differences in results. BUG=71832 TEST=none Review URL: http://codereview.chromium.org/6286072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74487 0039d316-1c4b-4281-b951-d872f2087c98
* Histogram size of safe-browsing database updates.shess@chromium.org2011-02-102-0/+9
| | | | | | | | | BUG=72216 TEST=monitor histograms. Review URL: http://codereview.chromium.org/6477001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74458 0039d316-1c4b-4281-b951-d872f2087c98
* Remove SQLite safe-browsing backing store.shess@chromium.org2011-02-099-1371/+25
| | | | | | | | | | | | | | | | | | | In October 2010, 7.0 rolled to stable with the safe-browsing database configured to read-from-sqlite and write-to-new-file-format. There is still a long tail of SQLite-format databases in the wild, but very small (and possibly due to a systemic issue with updating, so it may not get smaller). This change flips the switch to no longer support reading the SQLite files. Those users will do a full re-sync with the safe-browsing servers. BUG=58552 TEST=none Review URL: http://codereview.chromium.org/6413022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74253 0039d316-1c4b-4281-b951-d872f2087c98
* Don't update safe-browsing database if no updates come down.shess@chromium.org2011-02-093-2/+69
| | | | | | | | | | | | | | For simplicity, the safe-browsing database code ran the full update cycle on every update. A significant number of updates make no changes to the database, in which case re-writing it is cost with no benefit. BUG=72216 TEST=unit test. Review URL: http://codereview.chromium.org/6250211 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74248 0039d316-1c4b-4281-b951-d872f2087c98
* Adding owners.lzheng@chromium.org2011-02-041-0/+3
| | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/6326017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73732 0039d316-1c4b-4281-b951-d872f2087c98
* Copy buffers in base::FileUtilProxy::{Read,Write} to avoid memory corruption. darin@chromium.org2011-02-041-1/+1
| | | | | | | | | | | | | | | | | | If caller has called PPB_FileIO_Impl::Close() while a read or write operation is in flight, and deletes the read or write buffer, we now avoid corrupting memory. For Write, FileUtilProxy::Write simply copies the input buffer before passing control to the FILE thread. For Read, the caller no longer passes a buffer; instead, they are passed a const char* in the ReadCallback. One caller of FileUtilProxy::Read outside of PPAPI was also updated. BUG=70285 R=darin Patch by Adam Klein (adamk@chromium.org) Originally reviewed at http://codereview.chromium.org/6312040/ Review URL: http://codereview.chromium.org/6349090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73714 0039d316-1c4b-4281-b951-d872f2087c98
* Change UTF8ToUTF16 to accept const StringPiece&.suzhe@google.com2011-01-283-1/+5
| | | | | | | | | BUG=70936 TEST=All unit tests should pass. Review URL: http://codereview.chromium.org/6317016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72921 0039d316-1c4b-4281-b951-d872f2087c98
* Limit the number of requests sent by phishing client side detection per day.bryner@chromium.org2011-01-273-0/+83
| | | | | | | | | | | | | | | Currently we don't serialize this information so the counter will reset on browser restart. Patch from Garrett Casto <gcasto@google.com> BUG=None TEST=ran client_side_detection_service_unittest.cc Review URL: http://codereview.chromium.org/6240011 Patch from Garrett Casto <gcasto@google.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72848 0039d316-1c4b-4281-b951-d872f2087c98
* Move l10n_util to ui/baseben@chromium.org2011-01-211-1/+1
| | | | | | | | | BUG=none TEST=none TBR=brettw git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72227 0039d316-1c4b-4281-b951-d872f2087c98
* Remove obsolete base/lock.h and fix up callers to use the new header file andbrettw@chromium.org2011-01-214-13/+13
| | | | | | | | | | | the base namespace. Fix several files including lock.h unnecessarily. BUG=none TEST=none Original review=http://codereview.chromium.org/6142009/ Patch by leviw@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72106 0039d316-1c4b-4281-b951-d872f2087c98
* Move ResourceBundle, DataPack to ui/baseben@chromium.org2011-01-201-1/+1
| | | | | | | | | | BUG=none TEST=none TBR=brettw Review URL: http://codereview.chromium.org/6263008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72038 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a possible crash in the ClientSideDetectionService.bryner@chromium.org2011-01-202-10/+7
| | | | | | | | | | | | | | | | | | This fixes a problem where if the model fetch is still running when the ClientSideDetectionService is destroyed, the URLFetcher is not deleted. This could potentially cause the OnURLFetchComplete callback to be called on a deleted ClientSideDetectionService object. Now the model fetcher will always be deleted, and we will also make sure to destroy the ClientSideDetectionService before tearing down the IO thread (since the URLFetcher dtor can post messages there). BUG=none TEST=none Review URL: http://codereview.chromium.org/6298004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71901 0039d316-1c4b-4281-b951-d872f2087c98
* Add a link to the safe browsing privacy policies in the option to send ↵panayiotis@google.com2011-01-141-3/+27
| | | | | | | | | | malware details to Google. BUG=60831 TEST=relevant unit_tests,browser_tests, go to ianfette.org. Review URL: http://codereview.chromium.org/6268001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71506 0039d316-1c4b-4281-b951-d872f2087c98
* Remove thumbnails from the ClientSideDetectionService.bryner@chromium.org2011-01-144-49/+11
| | | | | | | | | BUG=none TEST=ClientSideDetectionServiceTest Review URL: http://codereview.chromium.org/6277002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71503 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the unused enlarge.lzheng@chromium.org2011-01-142-14/+0
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/6151010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71462 0039d316-1c4b-4281-b951-d872f2087c98
* Add a unique ID for each URL in the malware details protocol buffer. This ↵panayiotis@google.com2011-01-134-92/+130
| | | | | | | | | | allows us to save some space in the protocol buffer by not repeating the urls of parents and children. Also, change some string fields to bytes to avoid the implicit utf-8 conversion when not applicable. BUG=60831 TEST=relevant unit_tests, browser_tests Review URL: http://codereview.chromium.org/6208003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71384 0039d316-1c4b-4281-b951-d872f2087c98
* Add support to sha256 hash the downloaded file.lzheng@chromium.org2011-01-132-0/+23
| | | | | | | | | BUG=60822 TEST=base_file_unittest.cc Review URL: http://codereview.chromium.org/6023006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71379 0039d316-1c4b-4281-b951-d872f2087c98
* net: Remove typedef net::URLRequestStatus URLRequestStatus;tfarina@chromium.org2011-01-133-24/+24
| | | | | | | | | BUG=64263 TEST=compiled locally, trybots Review URL: http://codereview.chromium.org/6166010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71285 0039d316-1c4b-4281-b951-d872f2087c98
* Parse binhash sent from safebrowsing server.lzheng@chromium.org2011-01-125-151/+443
| | | | | | | | | | | | | | | | The binhash will be in this format for add-data ans sub-data: ADD-DATA = (PREFIX)+ PREFIX = <HASHLEN unsigned bytes> SUB-DATA = (ADDCHUNKNUM PREFIX)+ ADDCHUNKNUM = <4 byte unsigned integer in network byte order> PREFIX = <HASHLEN unsigned bytes> BUG=60822 TEST=safe_browsing_database_unittest.cc,protocol_parser_unittest.cc Review URL: http://codereview.chromium.org/6025002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71213 0039d316-1c4b-4281-b951-d872f2087c98
* Deal with truncated chunk.lzheng@chromium.org2011-01-102-6/+21
| | | | | | | | | | | In case the chunk is truncated, we should not read data from out side of the buffer. BUG=none TEST=protocol_parser_unittest.cc Review URL: http://codereview.chromium.org/6154002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70958 0039d316-1c4b-4281-b951-d872f2087c98
* Add a checkbox to the malware interstitial page, for user to opt-in to send ↵panayiotis@google.com2011-01-074-8/+80
| | | | | | | | | | | | | malware report. The user's choice will be stored as preference in user's profile. Landing original change by kewang: http://codereview.chromium.org/5102001/. BUG=60831 TEST=Relevant unit_tests,browser_tests Review URL: http://codereview.chromium.org/6066011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70755 0039d316-1c4b-4281-b951-d872f2087c98
* Disable crashy SafeBrowsingBlockingPageTest.MalwareIframeProceedphajdan.jr@chromium.org2011-01-071-1/+3
| | | | | | | | | | TBR=panayiotis BUG=68834 TEST=browser_tests Review URL: http://codereview.chromium.org/6148002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70723 0039d316-1c4b-4281-b951-d872f2087c98
* net: Add namespace net to the remaining files under url_request directory.tfarina@chromium.org2011-01-062-6/+11
| | | | | | | | | | | | It just adds the 'namespace net' to these files and a typedef for them, because there are many entries to fix in one pass. They will be fixed later. BUG=64263 TEST=trybots Review URL: http://codereview.chromium.org/6056007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70592 0039d316-1c4b-4281-b951-d872f2087c98
* Add several helper functions.lzheng@chromium.org2011-01-051-279/+233
| | | | | | | | | BUG=none TEST=safe_browsing_database_unittest.cc stays green. Review URL: http://codereview.chromium.org/6011008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70542 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/lock and base/condition_variable to base/synchronization/brettw@chromium.org2011-01-011-13/+12
| | | | | | | | | | | I kept a base/lock.h in place with a using statement to avoid updating all callers in one CL. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6018013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70363 0039d316-1c4b-4281-b951-d872f2087c98
* Move platform_thread to base/threading and put in the base namespace. I left abrettw@chromium.org2010-12-311-1/+2
| | | | | | | | | | | stub and "using" declarations in the old location to avoid having to change the entire project at once. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6001010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70342 0039d316-1c4b-4281-b951-d872f2087c98
* Consolidate some safe-browsing histograms.shess@chromium.org2010-12-284-20/+82
| | | | | | | | | | | | | | Combine SB2.GetHash200 and SB2.GetHash204 into SB2.GetHashResult enum. Rework SB2.GetHashServerMiss to increment only once per request, rather than for each client. Also fold it into SB2.GetHashResult. BUG=none TEST=Monitor histograms. Review URL: http://codereview.chromium.org/6025005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70243 0039d316-1c4b-4281-b951-d872f2087c98
* Remove wstring from l10n_util. Part 2.avi@chromium.org2010-12-282-68/+74
| | | | | | | | | BUG=9911 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/5959008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70242 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for safebrowsing download protection. It is currently under flag ↵lzheng@chromium.org2010-12-223-34/+135
| | | | | | | | | | | --safebrowsing-download-protection. TEST=safe_browsing_service_browsertest.cc BUG=60822 Review URL: http://codereview.chromium.org/5141006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69979 0039d316-1c4b-4281-b951-d872f2087c98
* Remove some duplicate histograms.shess@chromium.org2010-12-221-8/+2
| | | | | | | | | | | These duplicate the SB2.DatabaseFailure enum. BUG=58401 TEST=none Review URL: http://codereview.chromium.org/5970007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69933 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 69592 - file_version_info was not finding Mac values correctly.dmaclach@chromium.org2010-12-181-1/+1
| | | | | | | | | | | | | | Changed file_version_info to find Mac values, and changed version_info to fail if values can't be found. BUG=NONE TEST=BUILD Review URL: http://codereview.chromium.org/5815001 TBR=dmaclach@chromium.org Review URL: http://codereview.chromium.org/6017003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69601 0039d316-1c4b-4281-b951-d872f2087c98
* file_version_info was not finding Mac values correctly.dmaclach@chromium.org2010-12-181-1/+1
| | | | | | | | | | | Changed file_version_info to find Mac values, and changed version_info to fail if values can't be found. BUG=NONE TEST=BUILD Review URL: http://codereview.chromium.org/5815001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69592 0039d316-1c4b-4281-b951-d872f2087c98
* Almost done deinlining virtual methods.erg@google.com2010-12-162-5/+6
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/5841002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69470 0039d316-1c4b-4281-b951-d872f2087c98
* Handle download url list and binary hash list in safe browsing. Addedlzheng@chromium.org2010-12-1512-321/+927
| | | | | | | | | | a switch to enable this feature on safebrowsing service level. TEST=safe_browsing_database_unittest.cc,safe_browsing_test.cc BUG=60822 Review URL: http://codereview.chromium.org/5209003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69275 0039d316-1c4b-4281-b951-d872f2087c98
* Make members of Singleton<T> private and only visible to the singleton type. ↵satish@chromium.org2010-12-142-4/+7
| | | | | | | | | | | | | | | This enforces that the Singleton<T> pattern can only be used within classes which want singleton-ness. As part of this CL I have also fixed up files which got missed in my previous CLs to use a GetInstance() method and use Singleton<T> from the source file. There are a small number of places where I have also switched to LazyInstance as that was more appropriate for types used in a single source file. BUG=65298 TEST=all existing tests should continue to pass. Review URL: http://codereview.chromium.org/5682008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69107 0039d316-1c4b-4281-b951-d872f2087c98
* Deinline even more destructors.erg@google.com2010-12-142-56/+94
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/5794003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69084 0039d316-1c4b-4281-b951-d872f2087c98
* Add a browser test for safebrowsing service.lzheng@chromium.org2010-12-136-34/+453
| | | | | | | | BUG=none TEST=safe_browsing_service_browsertest Review URL: http://codereview.chromium.org/5544008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69072 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove unneeded browser_thread.h usage.thestig@chromium.org2010-12-131-1/+0
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/5676004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69037 0039d316-1c4b-4281-b951-d872f2087c98