summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing/safe_browsing_util.h
Commit message (Collapse)AuthorAgeFilesLines
* FBTF: Even more deinlining.erg@google.com2010-10-201-6/+10
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3879002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63261 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up unnecessary #includes of base/{scoped_ptr.h,string16.h}.viettrungluu@chromium.org2010-08-191-1/+0
| | | | | | | | | | | | 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
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-261-0/+1
| | | | | | | | | 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
* Canonicalize the url based on Section 6.1 Safe Browsing Spec.inferno@chromium.org2010-03-301-0/+7
| | | | | | | | BUG=7713 TEST=SafeBrowsingUtilTest.CanonicalizeUrl Review URL: http://codereview.chromium.org/1275002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43100 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor chunk ownership in SafeBrowsing code.shess@chromium.org2010-03-081-2/+45
| | | | | | | | | | | | | | | | | | | This attempts to clean up ownership so that it's more clear who creates and deletes the chunk data between parsing and storage in the database. SBChunkList replaces std::deque<SBChunk>, mostly to add correct cleanup in the destructor rather than requiring FreeChunks() to be called manually. Additionally remove deletion of chunk info from the database layer, now it processes const data. Additionally remove the need for SafeBrowsingDatabase to have a chunk-inserted callback by having the caller handle it directly. BUG=none TEST=none Review URL: http://codereview.chromium.org/668123 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40942 0039d316-1c4b-4281-b951-d872f2087c98
* Remove dead code from safe_browsing_util.h/cc.shess@chromium.org2010-02-181-82/+24
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/630012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39398 0039d316-1c4b-4281-b951-d872f2087c98
* linux: build with -Wextraevan@chromium.org2010-02-051-2/+2
| | | | | | | | | | | | 95% of this is removing "const" from return types, but turning this on found one bug! (A "for" loop that expected its iterator to go negative but which was using an unsigned type.) BUG=34160 Review URL: http://codereview.chromium.org/570012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38266 0039d316-1c4b-4281-b951-d872f2087c98
* Misc. cleanup of safe_browsing_util.cc:pkasting@chromium.org2009-12-031-10/+11
| | | | | | | | | | | | | | | | | | | | * Shorten code where easy to do so * Remove an unneeded line * Better function parameter names for one function * Be consistent about not using {} on one-line bodies (some places did, some didn't) * Be consistent about using "a" and "!a" instead of "a != 0" and "a == 0" (some places did one, some did the other) * No else after return/continue * Reduce duplicated code by reordering lines * Use for () instead of while () where doing so would shorten things * More comments in a few places * Use iterators in a few cases where doing so avoids more verbose or complex code * Name a few constants BUG=none TEST=none Review URL: http://codereview.chromium.org/452043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33695 0039d316-1c4b-4281-b951-d872f2087c98
* Make the safe_browsing_util.cc function definition order match the ↵pkasting@chromium.org2009-12-021-1/+5
| | | | | | | | | | declaration order. BUG=none TEST=none Review URL: http://codereview.chromium.org/460008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33545 0039d316-1c4b-4281-b951-d872f2087c98
* Build fix for Linux perf bot.pkasting@chromium.org2009-12-011-0/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33509 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up Safe Browsing code a little:pkasting@chromium.org2009-12-011-13/+7
| | | | | | | | | | | | | | * Update copyrights. * Remove unnecessary headers. * Remove useless functions. * Make declaration and definition order match (in at least the _database_bloom.* files). * Eliminate database_perftest.cc, since it seems to have been disabled entirely since before the public launch, and looks like it's perhaps irrelevant to the current code design. BUG=none TEST=none Review URL: http://codereview.chromium.org/457019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33479 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes almost all of the rest of lint errors in the chrome/ directory (minus ↵erg@google.com2009-11-131-2/+2
| | | | | | | | the really hard ones which will need actual review instead of rubber-stamping.) Review URL: http://codereview.chromium.org/386026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31932 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some strict aliasing errors from r31773 caught with gcc 4.4.craig.schlenter@chromium.org2009-11-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | I've chosen to use a union here instead of restoring the original memcpy code. Errors were as follows: cc1plus: warnings being treated as errors chrome/browser/safe_browsing/safe_browsing_database_bloom.cc: In member function ‘virtual bool SafeBrowsingDatabaseBloom::ContainsUrl(const GURL&, std::string*, std::vector<int, std::allocator<int> >*, std::vector<SBFullHashResult, std::allocator<SBFullHashResult> >*, base::Time)’: chrome/browser/safe_browsing/safe_browsing_database_bloom.cc:274: error: dereferencing pointer ‘full_hash.207’ does break strict-aliasing rules chrome/browser/safe_browsing/safe_browsing_database_bloom.cc:274: note: initialized from here chrome/browser/safe_browsing/safe_browsing_database_bloom.cc: In member function ‘void SafeBrowsingDatabaseBloom::InsertSub(int, SBPrefix, SBEntry*)’: chrome/browser/safe_browsing/safe_browsing_database_bloom.cc:478: error: dereferencing pointer ‘full_hash.258’ does break strict-aliasing rules chrome/browser/safe_browsing/safe_browsing_database_bloom.cc:478: note: initialized from here chrome/browser/safe_browsing/safe_browsing_database_bloom.cc: In member function ‘void SafeBrowsingDatabaseBloom::InsertAdd(SBPrefix, SBEntry*)’: chrome/browser/safe_browsing/safe_browsing_database_bloom.cc:402: error: dereferencing pointer ‘full_hash.237’ does break strict-aliasing rules chrome/browser/safe_browsing/safe_browsing_database_bloom.cc:402: note: initialized from here make: *** [out/Release/obj.target/browser/chrome/browser/safe_browsing/safe_browsing_database_bloom.o] Error 1 Review URL: http://codereview.chromium.org/389021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31798 0039d316-1c4b-4281-b951-d872f2087c98
* Ignore GetHash results for lists that we don't support.paulg@google.com2009-01-081-0/+9
| | | | | | | BUG=5597 (http://crbug.com/5597) Review URL: http://codereview.chromium.org/16595 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7710 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for 256 bit full hashes to the new implementation.paulg@google.com2008-11-111-0/+4
| | | | | | | | | This CL replaces the following, which seems to have become inaccessible: http://codereview.chromium.org/9202/ Review URL: http://codereview.chromium.org/10402 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5159 0039d316-1c4b-4281-b951-d872f2087c98
* Change the detection of the list name from parsing a URLpaulg@google.com2008-10-221-0/+1
| | | | | | | | to storing it from the update in order to avoid breaking due to changes in the format. Review URL: http://codereview.chromium.org/7851 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3717 0039d316-1c4b-4281-b951-d872f2087c98
* Support zero size chunks in the current implementation.paulg@google.com2008-10-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This allows the SafeBrowsing servers to send us Add and Sub chunks with no content so that when we report our update status, the request size is decreased. Our update status request contains a list of all chunks that we have received from the service, and this can get fragmented over time. For example, the part of the request containing our phishing chunks might look like this: goog-phish-shavar:a:1,3,5,7,9,11,13,15,17 By sending zero size chunks for the chunk numbers missing from the above example, the report will now look like: goog-phish-shavar:a:1-17 Given the large number of chunks and the rate of chunk expiry, this change will reduce the client request size. BUG= http://code.google.com/p/chromium/issues/detail?id=3262 Review URL: http://codereview.chromium.org/6369 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3131 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup EOL and include guards, including fixing one guard that was not the ↵deanm@chromium.org2008-09-201-4/+3
| | | | | | | | correct path. Lack of EOL on bloom_filter.h had broken the Linux build, this is a fatal warning with GCC. Review URL: http://codereview.chromium.org/4007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2437 0039d316-1c4b-4281-b951-d872f2087c98
* Include chrome/browser/SConscript in Linux build.tc@google.com2008-09-171-0/+2
| | | | | | | | | | | | | | | In dns_host_info.cc there was probably a bug (hardcoded 1 instead of length. BUG=2333 R=mark,sgk Original patch by phajdan.jr@gmail.com at: http://codereview.chromium.org/2890 Review URL: http://codereview.chromium.org/3108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2317 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Try to cut down on some unnecessary dependencies. Remove any unused ↵deanm@google.com2008-07-281-1/+2
| | | | | | includes of gurl.h in header files, and forward declare GURL where possible. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33 0039d316-1c4b-4281-b951-d872f2087c98
* Add chrome to the repository.initial.commit2008-07-261-0/+324
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15 0039d316-1c4b-4281-b951-d872f2087c98