summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing
Commit message (Collapse)AuthorAgeFilesLines
* Fix to use FilePath version of PathService::Get.thestig@chromium.org2009-09-091-9/+7
| | | | | | | | | | | BUG=None TEST=None Original Review URL: http://codereview.chromium.org/174189 Patch from Thiago Farina <thiago.farina@gmail.com>. Review URL: http://codereview.chromium.org/193047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25778 0039d316-1c4b-4281-b951-d872f2087c98
* Replace the RenderProcessHost.PID function that returns the OS-generatedbrettw@chromium.org2009-08-311-1/+1
| | | | | | | | | | | | | | | | | | | | process ID with an internally-generated id() function. This allows us the guarantee that the IDs are unique over the entire run of the application. This also cleans up some code associated with managing the PID. The main potentially interesting change is now the PID is set uniquely for every creation of RenderProcessHost. It used to be set cleared if the process went away, and re-set if the process was re-created. The ID generation is in ChildProcesInfo so it is also unique between workers and plugins. I had to change some significant things in resource_dispatcher_host_unittest to take into account this new generation of IDs. BUG=17828 TEST=none Review URL: http://codereview.chromium.org/160203 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24899 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Fix a ton of compiler warnings."tony@chromium.org2009-08-282-5/+5
| | | | | | | | | | | This reverts commit r24792. TBR=estade Review URL: http://codereview.chromium.org/179028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24796 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a ton of compiler warnings.estade@chromium.org2009-08-282-5/+5
| | | | | | | | | | | | | | | Most of these are classes with virtual methods lacking virtual destructors or NULL used in non-pointer context. BUG=none TEST=app_unittests && base_unittests --gtest_filter=-ConditionVariableTest.LargeFastTaskTest patch by Jacob Mandelson <jlmjlm [at] gmail> http://codereview.chromium.org/171028/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24792 0039d316-1c4b-4281-b951-d872f2087c98
* Use 'icu::' namespace explicitly throughout Chrome tree instead of relying ↵jshin@chromium.org2009-08-181-1/+1
| | | | | | | | | | | | | | | | | | | on 'using namespace icu'. This is Chrome's counterpart to the ICU header change that disables 'using namespace icu' (http://codereview.chromium.org/171010/show), which is required to avoid the name colission between Chrome's StringPiece (in base) and ICU's StringPiece. The webkit change (which is minor) will be dealt with in the webkit bugzilla. This can go in before the ICU change/upgrade without affecting anything. BUG=8198 TEST=All the targets are built without an error on all platforms. Review URL: http://codereview.chromium.org/171012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23613 0039d316-1c4b-4281-b951-d872f2087c98
* Simple cleanup.maruel@chromium.org2009-08-131-1/+1
| | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/164424 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23327 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for an "update in progress" DCHECK.paul@chromium.org2009-08-072-1/+32
| | | | | | | | | | | | | | | | | | | | A DCHECK in SafeBrowsingService::UpdateStarted can potentially be triggered if there is an error opening the database for reading, or if there is no response from the server for a update request. Both of these cases can cause our 'update_in_progress_' flag to not be reset properly before the next update. This CL adds: - a timeout for update responses - better handling for database errors that properly resets the update state. BUG=12835 (http://crbug.com/12835) TEST=None. Review URL: http://codereview.chromium.org/165008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22814 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the root cause of flakiness in ↵phajdan.jr@chromium.org2009-07-283-16/+15
| | | | | | | | | | | | | SafeBrowsingProtocolManagerTest.TestGetHashBackOffTimes and undisable the test. TEST=none http://crbug.com/1880 Review URL: http://codereview.chromium.org/160225 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21843 0039d316-1c4b-4281-b951-d872f2087c98
* This provides a simpler js template engine than JsTemplate. It has beenarv@google.com2009-07-141-1/+1
| | | | | | | | | | | | | | | | | | optimized for the way we do internationalization with JST before and is about 4 times faster (average 4.8ms vs 22.8ms) for the history page. The syntax for this is very similar to JsTemplates. It uses the attributes i18n-values and i18n-content which worls like jsvalues and jscontent except that it does not allow arbitrary expressions. BUG=None TEST=All UI pages should work as before Review URL: http://codereview.chromium.org/149420 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20590 0039d316-1c4b-4281-b951-d872f2087c98
* Do some refactoring of renderer_host.brettw@chromium.org2009-07-061-1/+1
| | | | | | | | | | | | | | | | | | | This removes the last dependency on tab_contents from the renderer_host code and into the RenderViewHostDelegate. Some of the tests depended on tab_contents, so I moved to a new directory with the tab_contents include allowed via DEPS. Now DEPS can enforce that no additional tab_contents includes are added to renderer_host. RenderViewHost delegate is now pure virtual. After spending a while *again* figuring out why my code didn't work, only to find it was because the default implementation of a function was getting called instead of the real one, I decided to make this pure virtual. It is implemented by TabContents, which implements basically everything, and two other places that implement less. Only two lists of duplicate functions seems not too bad, although long-term it would be nice if this delegate was somehow more succinct. Review URL: http://codereview.chromium.org/155071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19982 0039d316-1c4b-4281-b951-d872f2087c98
* Extract load times from WebDataSource. Move them to NavigationState.darin@chromium.org2009-06-161-0/+2
| | | | | | | | | | | | Move PasswordForm into the webkit_glue namespace. TEST=none BUG=10041 R=brettw Review URL: http://codereview.chromium.org/126190 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18515 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce header dependencies in chrome/browser/phajdan.jr@chromium.org2009-06-161-0/+1
| | | | | | | | In my scan of headers I got up to browser/gtk/ Review URL: http://codereview.chromium.org/126131 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18500 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce header dependencies in base/phajdan.jr@chromium.org2009-06-031-0/+1
| | | | | | | | Also adds more explicit #includes for needed things. Review URL: http://codereview.chromium.org/118162 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17479 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup temp files/folders in a few more tests.munjal@chromium.org2009-06-011-9/+22
| | | | | | Review URL: http://codereview.chromium.org/118074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17359 0039d316-1c4b-4281-b951-d872f2087c98
* Add a histogram to measure the number of times we askpaulg@google.com2009-05-111-1/+8
| | | | | | | | | | for a prefix that the SafeBrowsing servers have, but that the full hashes provided in the response don't match the URL we're looking up. Review URL: http://codereview.chromium.org/115201 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15795 0039d316-1c4b-4281-b951-d872f2087c98
* Add a performance test for measuring hash implementation time.paulg@google.com2009-05-111-4/+66
| | | | | | Review URL: http://codereview.chromium.org/115198 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15789 0039d316-1c4b-4281-b951-d872f2087c98
* Decrease the SafeBrowsing false positive rate.paulg@google.com2009-05-098-88/+245
| | | | | | | | | | | | | | | | | This CL replaces the weak hashing functions of the bloom filter for a more thorough mixing function. The bloom filter is modified to use and store random keys in the mixing function. This addresses the need for randomizing the contents of each user's bloom filter to prevent a false positive for a popular site causing a global spike in hash requests. BUG=10584 (http://crbug.com/10584) BUG=10634 (http://crbug.com/10634) Review URL: http://codereview.chromium.org/113064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15703 0039d316-1c4b-4281-b951-d872f2087c98
* Landing approved patch for Yuta Kitamura (yutak@google.com)mbelshe@google.com2009-05-082-26/+28
| | | | | | | | | | | | | This patch fixes an assertion failure that occurs when Windows is back from sleep. BUG=11141 Original changelist is http://codereview.chromium.org/109034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15685 0039d316-1c4b-4281-b951-d872f2087c98
* Separate the key setting code in the constructor of HMAC class into the Initwtc@chromium.org2009-05-051-3/+3
| | | | | | | | | | | | | | | | | | method. Overload the Init method for char* and std::string. Add DCHECKs to the destruction methods in ~HMAC in hmac_win.cc. The patch is written by Takeshi Yoshino <tyoshino@google.com>. Original code review: http://codereview.chromium.org/88062 R=wtc http://crbug.com/2297 TEST=base_unittests should pass. Safe browsing should continue to work. Review URL: http://codereview.chromium.org/113001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15353 0039d316-1c4b-4281-b951-d872f2087c98
* Move l10n_util to app/ben@chromium.org2009-05-051-1/+1
| | | | | | | http://crbug.com/11387 Review URL: http://codereview.chromium.org/109043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15352 0039d316-1c4b-4281-b951-d872f2087c98
* Move scoped_vector.h and stl_util-inl.h to base/ben@chromium.org2009-05-051-1/+1
| | | | | | | | http://crbug.com/11387 Review URL: http://codereview.chromium.org/107001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15272 0039d316-1c4b-4281-b951-d872f2087c98
* Adds toplevel app/ directory and moves ResourceBundle into it.ben@chromium.org2009-05-051-1/+1
| | | | | | | | | | | No changes to resource bundle yet, just the move to keep this CL as compact as possible. Adds new vcproj and gyp file for app dir. http://crbug.com/11387 Review URL: http://codereview.chromium.org/100354 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15264 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for handling files containing URLs with a samplingpaulg@google.com2009-05-051-17/+51
| | | | | | | | | weight. Also print out a few more statistics like the number of URLs examined and the number of host + path pairs looked up. Review URL: http://codereview.chromium.org/105005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15263 0039d316-1c4b-4281-b951-d872f2087c98
* Deprecate wstring version of PathService::Get() in unit tests.thestig@chromium.org2009-05-041-8/+7
| | | | | | Review URL: http://codereview.chromium.org/100292 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15221 0039d316-1c4b-4281-b951-d872f2087c98
* Replace all occurrances of WebContents with TabContents.brettw@chromium.org2009-05-044-20/+20
| | | | | | Review URL: http://codereview.chromium.org/99177 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15194 0039d316-1c4b-4281-b951-d872f2087c98
* Add some histograms to see how often users click through blocking pages.abarth@chromium.org2009-05-011-0/+21
| | | | | | | | | R=jar Review URL: http://codereview.chromium.org/99020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15018 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 14569abarth@chromium.org2009-04-261-21/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14573 0039d316-1c4b-4281-b951-d872f2087c98
* Add some histograms to see how often users click through blocking pages.abarth@chromium.org2009-04-261-0/+21
| | | | | | | | R=jar Review URL: http://codereview.chromium.org/99020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14569 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a leak of the NavigationController during many tests. A duplicatebrettw@chromium.org2009-04-211-3/+3
| | | | | | | | | | NavigationController was begin created from when we had to create this separately. BUG=10781 Review URL: http://codereview.chromium.org/88018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14084 0039d316-1c4b-4281-b951-d872f2087c98
* Rename WebContentsView* to TabContentsView* in preparation for mergingbrettw@chromium.org2009-04-201-1/+1
| | | | | | | | | | TabContents and WebContents. This also removes the Destroy method from the print manager's header file. I removed the impl in a previous change but forgot the header. Review URL: http://codereview.chromium.org/90004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14063 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land my change to clean up TabContents/WebContents ownership. Thisbrettw@chromium.org2009-04-203-21/+19
| | | | | | | | | | | | | | | | | | | | | | | | is the same except in tab_strip_model_unittest I fixed a leak by making a WebContents on the stack, I added a factory to the SiteInstance unittest to prevent another leak, and I re-added a NULL set to the external_tab_container. Fix the ownership model of TabContents and NavigationController. Previously the NavigationController owned the TabContents, and there were extra steps required at creation and destruction to clean everything up properly. NavigationController is now a member of TabContents, and there is no setup or tear down necessary other than the constructor and destructor. I could remove the tab contents creation in the NavigationController, as well as all the weird destruction code in WebContents which got moved to the destructor. I made the controller getter return a reference since the ownership is clear and there is no possibility of NULL. This required changing a lot of tiles, but many of them were simplified since they no longer have to NULL check. Previous review URL: http://codereview.chromium.org/69043 Review URL: http://codereview.chromium.org/67294 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14053 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 14005.brettw@chromium.org2009-04-183-19/+21
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14006 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the ownership model of TabContents and NavigationController. Previously thebrettw@chromium.org2009-04-183-21/+19
| | | | | | | | | | | | | | | | | NavigationController owned the TabContents, and there were extra steps required at creation and destruction to clean everything up properly. NavigationController is now a member of TabContents, and there is no setup or tear down necessary other than the constructor and destructor. I could remove the tab contents creation in the NavigationController, as well as all the weird destruction code in WebContents which got moved to the destructor. I made the controller getter return a reference since the ownership is clear and there is no possibility of NULL. This required changing a lot of tiles, but many of them were simplified since they no longer have to NULL check. Review URL: http://codereview.chromium.org/69043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14005 0039d316-1c4b-4281-b951-d872f2087c98
* Create a test program for generating false positive statisticspaulg@google.com2009-04-171-0/+280
| | | | | | | | | | | | | | for SafeBrowsing data. The program reads a regular SafeBrowsing database and creates bloom filters of various sizes, comparing the hit and miss statistics against a list of URLs. BUG=10584 (http://crbug.com/10584) Review URL: http://codereview.chromium.org/67245 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13981 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce the false positive rate for SafeBrowsing gethash requests.paulg@google.com2009-04-174-4/+27
| | | | | | | | | | | | | | | | | | | | | | | | This CL increases the memory consumption of the bloom filter used by the SafeBrowsing system in order to decrease the number of false positive gethash requests (gethash requests that result in an empty or 204 response from the servers). The filter size in bytes is calculated as: number_of_add_prefixes * bits_per_prefix / 8 From analysis of our histograms, users have between 250k - 330k add prefixes. 'bits_per_prefix' is hard coded to 25, which means that we expect the typical bloom filter to be between 760-1000 kB, compared to the current value of approximately 450 kB. We add histograms to track the filter size, as well as the number of gethash requests that return empty results and non-empty results. BUG=10584 (http://crbug.com/10584) Review URL: http://codereview.chromium.org/67243 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13958 0039d316-1c4b-4281-b951-d872f2087c98
* Remove TabContentsType from the NavigationController external interface and inbrettw@chromium.org2009-04-152-7/+7
| | | | | | | some related areas. I removed all uses of this in the previous patch. Review URL: http://codereview.chromium.org/73057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13730 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unused database code.paulg@google.com2009-04-082-33/+0
| | | | | | | | | The new storage system doesn't check URLs on the DB thread any longer, so this code is never called. Review URL: http://codereview.chromium.org/62110 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13311 0039d316-1c4b-4281-b951-d872f2087c98
* This CL adds unit-tests for the SafeBrowsingBlockingPage class.jcampan@chromium.org2009-04-035-17/+427
| | | | | | | | | | | | | | | | | This required: - creating a factory to create SafeBrowsingBlockingPage instances (so unit-tests can provide their own sub-classes). - making the code posts tasks on the current message loop when there is no IO thread. This should only happen in tests scenarios where we only have 1 thread. BUG=6731 TEST=Run the unit-tests. In Chrome, navigate to pages flagged as malware (ex: ianfette.org) and make sure the safe browsing feature still works as expected. Review URL: http://codereview.chromium.org/56135 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13088 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the old and no longer used SafeBrowsing storagepaulg@google.com2009-03-218-1571/+11
| | | | | | | implementation. Review URL: http://codereview.chromium.org/45016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12238 0039d316-1c4b-4281-b951-d872f2087c98
* Fix errors detected by coverity.paulg@google.com2009-03-181-6/+6
| | | | | | Review URL: http://codereview.chromium.org/48136 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11981 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unneeded uses of base/hash_tables.h.thestig@chromium.org2009-03-172-2/+0
| | | | | | Review URL: http://codereview.chromium.org/48098 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11928 0039d316-1c4b-4281-b951-d872f2087c98
* Merge DOMUIContents into WebContents.brettw@chromium.org2009-03-171-1/+2
| | | | | | | I did a lot of cleanup of the DOM UI system as part of this. Review URL: http://codereview.chromium.org/42227 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11925 0039d316-1c4b-4281-b951-d872f2087c98
* Removed unneeded includes of base/time.h.thestig@chromium.org2009-03-161-1/+4
| | | | | | Review URL: http://codereview.chromium.org/48019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11766 0039d316-1c4b-4281-b951-d872f2087c98
* Remove logging.h from cc files that don't use it.thestig@chromium.org2009-03-123-3/+0
| | | | | | Review URL: http://codereview.chromium.org/42155 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11593 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unneeded uses of logging.h in header files.thestig@chromium.org2009-03-121-1/+0
| | | | | | Review URL: http://codereview.chromium.org/43148 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11590 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGEdeanm@chromium.org2009-03-103-4/+0
| | | | | | | | | Normalize end of file newlines in chrome/. All files end in a single newline. Review URL: http://codereview.chromium.org/42015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11331 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGE.maruel@google.com2009-03-059-26/+55
| | | | | | | Split the lines >80 cols. (Part 1) Review URL: http://codereview.chromium.org/39206 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11032 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes CRLF and trailing white spaces.maruel@chromium.org2009-03-055-13/+13
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10982 0039d316-1c4b-4281-b951-d872f2087c98
* revert broken change 10833nsylvain@chromium.org2009-03-031-67/+47
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10837 0039d316-1c4b-4281-b951-d872f2087c98
* Port DictionaryValue to use string16 instead of wstring.dsh@google.com2009-03-031-47/+67
| | | | | | | Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=10818 Review URL: http://codereview.chromium.org/31014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10833 0039d316-1c4b-4281-b951-d872f2087c98