summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing
Commit message (Collapse)AuthorAgeFilesLines
* This CL makes the safe browsing interstitial page support multiple unsafe ↵jcampan@chromium.org2009-01-234-170/+426
| | | | | | | | | | | | | | | | | | | | | | | resources in one page. We had a bug when an interstitial was showing and another unsafe resource was detected. We would show another interstitial on top of the original one, causing the DontProceed method to be invoked several times. That would cause us to remove more than once an entry from the navigation controller and cause crashers. With this new CL, if an interstitial shows and a new resource is flagged as bad, the SafeBrowsingBlockingPage will queue that notification. If the user decides to proceed through the interstitial, we'll create another interstitial warning about all the unsafe resources we have received so far. This CL also contains a fix for a crasher that would happen when closing a tab with a safe browsing interstitial. BUG=5916,6207,6306 TEST=Test all actions in the interstitial you get when opening pages with the followin scenarios: - Main page is malware - Main page is fishing - Main page is OK contains resources (images,iframes...) which are malware - Main page is OK contains resources (images,iframes...) which are phishing - Main page is OK contains resources (images,iframes...) some of them phishing, some of then malware. Note that when there are more than one bad resource, it is normal to see a 1st interstitial, then another one listing all the other bad resources. (ex of malware site http://ianfette.org, phishing site http://cvisit.tripod.com) Review URL: http://codereview.chromium.org/18346 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8578 0039d316-1c4b-4281-b951-d872f2087c98
* Replace cases of Append(FILE_PATH_LITERAL()) with AppendASCII("").deanm@chromium.org2009-01-221-2/+2
| | | | | | Review URL: http://codereview.chromium.org/18499 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8454 0039d316-1c4b-4281-b951-d872f2087c98
* Make CommandLine into a normal object, with some statics for getting at the ↵evan@chromium.org2009-01-213-3/+7
| | | | | | | | | | | current process's command line. One explicit goal of this change is to *not* deal with the string/wstring issues at the API on POSIX; the functions are the same as before, which means they remain as broken as before. (I did try to fix the internals, though, so migrating the callers is now possible by adding platform-appropriate hooks.) Review URL: http://codereview.chromium.org/18248 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8347 0039d316-1c4b-4281-b951-d872f2087c98
* End the SafeBrowsing update cycle when the update responsepaulg@google.com2009-01-161-8/+22
| | | | | | | | | | | | | contains no chunk URLs (i.e. the client is up to date). We currently don't handle this case properly, which results in a DCHECK being hit. BUG=6049 (http://crbug.com/6049) Review URL: http://codereview.chromium.org/18181 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8244 0039d316-1c4b-4281-b951-d872f2087c98
* Move url_* to net subdirben@chromium.org2009-01-161-1/+1
| | | | | | Review URL: http://codereview.chromium.org/18305 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8224 0039d316-1c4b-4281-b951-d872f2087c98
* Move a bunch of TabContents related files into a tab_contents subdirben@chromium.org2009-01-153-6/+6
| | | | | | Review URL: http://codereview.chromium.org/18250 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8058 0039d316-1c4b-4281-b951-d872f2087c98
* Fixing crash in SafeBrowsingDatabaseBloom:tommi@chromium.org2009-01-121-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When SafeBrowsingDatabaseBloom is going out of scope (see stack trace below) Close() is called. When insert_transaction_ is non NULL, it holds a pointer to the database, |db_|, which is owned by SafeBrowsingDatabaseBloom. Close() closes the database but did not free |insert_transaction_| which causes |insert_transaction_| to attempt to rollback the transaction with an invalid database pointer. The fix is simply to reset the transaction before closing the database. Stack: 0:009> kP ChildEBP RetAddr 0579fa14 027e73e0 ntdll!RtlEnterCriticalSection+0xb 0579fa24 027958e6 chrome_12d0000!winMutexEnter( struct sqlite3_mutex * p = 0xdddddddd)+0x10 [c:\chromium\src\third_party\sqlite\src\mutex_w32.c @ 185] 0579fa34 0278d76c chrome_12d0000!sqlite3_mutex_enter( struct sqlite3_mutex * p = 0xdddddddd)+0x16 [c:\chromium\src\third_party\sqlite\src\mutex.c @ 111] 0579fa80 029655f8 chrome_12d0000!sqlite3_exec( struct sqlite3 * db = 0x06df6618, char * zSql = 0x043feec0 "ROLLBACK", <function> * xCallback = 0x00000000, void * pArg = 0x00000000, char ** pzErrMsg = 0x00000000)+0x4c [c:\chromium\src\third_party\sqlite\src\legacy.c @ 50] 0579faa4 02965523 chrome_12d0000!SQLTransaction::EndCommand( char * command = 0x043feec0 "ROLLBACK")+0x48 [c:\chromium\src\chrome\common\sqlite_utils.cc @ 96] 0579fab8 029654ea chrome_12d0000!SQLTransaction::Rollback(void)+0x23 [c:\chromium\src\chrome\common\sqlite_utils.h @ 57] 0579fac4 02965496 chrome_12d0000!SQLTransaction::~SQLTransaction(void)+0x2a [c:\chromium\src\chrome\common\sqlite_utils.cc @ 82] 0579fad0 01ad0cdf chrome_12d0000!SQLTransaction::`scalar deleting destructor'(void)+0x16 0579faf0 01ac8c49 chrome_12d0000!scoped_ptr<SQLTransaction>::~scoped_ptr<SQLTransaction>(void)+0x3f [c:\chromium\src\base\scoped_ptr.h @ 72] 0579fafc 01ac8a86 chrome_12d0000!SafeBrowsingDatabaseBloom::~SafeBrowsingDatabaseBloom(void)+0x49 [c:\chromium\src\chrome\browser\safe_browsing\safe_browsing_database_bloom.cc @ 61] 0579fb08 017bb3a0 chrome_12d0000!SafeBrowsingDatabaseBloom::`scalar deleting destructor'(void)+0x16 0579fb28 01c66a99 chrome_12d0000!DeleteTask<SafeBrowsingDatabase>::Run(void)+0x40 [c:\chromium\src\base\task.h @ 227] 0579fbd8 01c66b45 chrome_12d0000!MessageLoop::RunTask( class Task * task = 0x0800df10)+0xb9 [c:\chromium\src\base\message_loop.cc @ 308] 0579fbe8 01c67029 chrome_12d0000!MessageLoop::DeferOrRunPendingTask( struct MessageLoop::PendingTask * pending_task = 0x0579fc04)+0x35 [c:\chromium\src\base\message_loop.cc @ 319] 0579fc24 01cea44c chrome_12d0000!MessageLoop::DoWork(void)+0xe9 [c:\chromium\src\base\message_loop.cc @ 408] 0579fd04 01c663bb chrome_12d0000!base::MessagePumpDefault::Run( class base::MessagePump::Delegate * delegate = 0x0579feb4)+0xbc [c:\chromium\src\base\message_pump_default.cc @ 23] 0579fdb0 01c66220 chrome_12d0000!MessageLoop::RunInternal(void)+0xfb [c:\chromium\src\base\message_loop.cc @ 197] 0579fde8 01c660aa chrome_12d0000!MessageLoop::RunHandler(void)+0x90 [c:\chromium\src\base\message_loop.cc @ 181] 0579fe10 01c86d38 chrome_12d0000!MessageLoop::Run(void)+0x3a [c:\chromium\src\base\message_loop.cc @ 155] 0579ffa4 01c86071 chrome_12d0000!base::Thread::ThreadMain(void)+0xb8 [c:\chromium\src\base\thread.cc @ 156] Review URL: http://codereview.chromium.org/17617 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7891 0039d316-1c4b-4281-b951-d872f2087c98
* Fix linux / mac build.paulg@google.com2009-01-081-2/+2
| | | | | | Review URL: http://codereview.chromium.org/17256 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7711 0039d316-1c4b-4281-b951-d872f2087c98
* Ignore GetHash results for lists that we don't support.paulg@google.com2009-01-086-41/+85
| | | | | | | 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 histograms to track the size of SafeBrowsing Updates.paulg@google.com2009-01-062-4/+20
| | | | | | | | | | | We will now measure: - the number of chunk URLs in an update - the size of each chunk URL - the total size of an update Review URL: http://codereview.chromium.org/17213 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7622 0039d316-1c4b-4281-b951-d872f2087c98
* clean up safe browsing pref registration by following thetc@google.com2009-01-062-2/+2
| | | | | | | | naming convention of other Local State register prefs methods. Review URL: http://codereview.chromium.org/17207 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7600 0039d316-1c4b-4281-b951-d872f2087c98
* Keep trying to undo 7564.estade@chromium.org2009-01-051-2/+2
| | | | | | | | tbr=jhawkins Review URL: http://codereview.chromium.org/17062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7572 0039d316-1c4b-4281-b951-d872f2087c98
* Unbreak unit tests. Revert r7564.estade@chromium.org2009-01-051-2/+2
| | | | | | | | tbr=jhawkins Review URL: http://codereview.chromium.org/16522 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7571 0039d316-1c4b-4281-b951-d872f2087c98
* * Bring up GreaseMonkeySlave unittest on OS X.jeremy@chromium.org2008-12-231-1/+5
| | | | | | | | * Fix missing Autoreleasepool warning in SafeBrowsing Unittest. Review URL: http://codereview.chromium.org/16243 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7432 0039d316-1c4b-4281-b951-d872f2087c98
* Review URL: http://codereview.chromium.org/14809jcampan@chromium.org2008-12-193-26/+42
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7281 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 7149.jcampan@chromium.org2008-12-173-42/+26
| | | | | | Review URL: http://codereview.chromium.org/15004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7153 0039d316-1c4b-4281-b951-d872f2087c98
* Revamp of the interstitial pages.jcampan@chromium.org2008-12-173-26/+42
| | | | | | | | | | | | | | The interstitial is now a RVH that is displayed on top of the WebContents with no interaction with the WebContents' RenderViewHostManager. This simplifies the states that the RenderViewHostManager has. The interstitial is responsible for hiding and deleting itself when told to proceed/not proceed or when a navigation occurs or the tab is closed. The interstitial now uses a data URL (instead of loading some alternate HTML), which allowed me to remove some interstitial flags from NavigationController::LoadCommittedDetails and ProvisionalLoadDetails. Also changed tab_utils::GetTabContentsByID to return a WebContents since only WebContents have a RVH associated with them. TEST=Run all ui tests and unit tests. Review URL: http://codereview.chromium.org/13764 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7149 0039d316-1c4b-4281-b951-d872f2087c98
* DatabaseLoadComplete now needs to be run after OnIOInitialize, so change the ↵jam@chromium.org2008-12-171-3/+3
| | | | | | | | | order of the PostTask. BUG=5587 Review URL: http://codereview.chromium.org/14499 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7129 0039d316-1c4b-4281-b951-d872f2087c98
* A new shot at the old system monitor changelist.mbelshe@google.com2008-12-132-8/+19
| | | | | | Review URL: http://codereview.chromium.org/12883 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6974 0039d316-1c4b-4281-b951-d872f2087c98
* Port flush_cache tool and perf_tests.phajdan.jr@chromium.org2008-12-122-88/+94
| | | | | | | | | BUG=4160,4263 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=6815 Review URL: http://codereview.chromium.org/9639 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6886 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 6815.phajdan.jr@chromium.org2008-12-112-94/+88
| | | | | | Review URL: http://codereview.chromium.org/14006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6816 0039d316-1c4b-4281-b951-d872f2087c98
* Port flush_cache tool and perf_tests.phajdan.jr@chromium.org2008-12-112-88/+94
| | | | | | | BUG=4160,4263 Review URL: http://codereview.chromium.org/9639 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6815 0039d316-1c4b-4281-b951-d872f2087c98
* Move file enumeration to filepaths.avi@google.com2008-12-111-2/+3
| | | | | | Review URL: http://codereview.chromium.org/13315 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6784 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of kPathSeparator on windows. Port some wstring function to take ↵estade@chromium.org2008-12-041-2/+2
| | | | | | | | FilePaths. Re-enable relevant posix unit tests. Review URL: http://codereview.chromium.org/12893 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6387 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure we end the update process if we get an errorfrom the servers. ↵paulg@google.com2008-12-043-8/+18
| | | | | | | | Previously, if we got a 400 (or other)error response, we'd leave the database and transactionopen.BUG=5060 (http://crbug.com/5060) Review URL: http://codereview.chromium.org/12918 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6337 0039d316-1c4b-4281-b951-d872f2087c98
* Rollbackmbelshe@google.com2008-12-012-19/+8
| | | | | | Review URL: http://codereview.chromium.org/13009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6127 0039d316-1c4b-4281-b951-d872f2087c98
* A new copy of the old system monitor changelist.mbelshe@google.com2008-11-302-8/+19
| | | | | | Review URL: http://codereview.chromium.org/12817 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6126 0039d316-1c4b-4281-b951-d872f2087c98
* Remove file_util::kPathSeparator from posix.estade@chromium.org2008-11-271-9/+9
| | | | | | Review URL: http://codereview.chromium.org/12489 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6099 0039d316-1c4b-4281-b951-d872f2087c98
* Turn on the new SafeBrowsing by default. To use the olderpaulg@google.com2008-11-263-6/+6
| | | | | | | | implemenation, use the command line flag: --old-safe-browsing Review URL: http://codereview.chromium.org/12448 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6015 0039d316-1c4b-4281-b951-d872f2087c98
* Fix up paths now that test_file_util has moved.deanm@chromium.org2008-11-251-1/+1
| | | | | | Review URL: http://codereview.chromium.org/12453 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6008 0039d316-1c4b-4281-b951-d872f2087c98
* Remove use of wide characters in stats table identifiers.evanm@google.com2008-11-223-35/+30
| | | | | | | Review URL: http://codereview.chromium.org/11544 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5880 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a few leaks in SafeBrowsing. These have been around since the ↵erikkay@google.com2008-11-214-8/+76
| | | | | | | | beginning, but have been hit by a particular pattern that's being sent down by the SB servers recently.BUG=http://code.google.com/p/chromium/issues/detail?id=4522 Review URL: http://codereview.chromium.org/11336 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5854 0039d316-1c4b-4281-b951-d872f2087c98
* Rollback "Remove use of wide characters in stats table identifiers."evanm@google.com2008-11-212-19/+19
| | | | | | | This reverts commit r5847. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5850 0039d316-1c4b-4281-b951-d872f2087c98
* Remove use of wide characters in stats table identifiers.evanm@google.com2008-11-212-19/+19
| | | | | | | Review URL: http://codereview.chromium.org/11544 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5847 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a crash that occurs during the browser shutdown process.paulg@google.com2008-11-181-8/+15
| | | | | | | | | | | | | | | | | It is possible that during the shutdown process, the database thread posts tasks back to the IO thread which result in calls to the SafeBrowsing protocol manager object. This object will have been deleted by the time the posted task runs, resulting in a crash. This change checks the enabled_ flag (which is set to false when the shutdown starts) for all tasks posted to the IO thread to protect against access to deleted objects. BUG = http://crbug.com/4531 Review URL: http://codereview.chromium.org/11245 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5644 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up a friend test declaration.paulg@google.com2008-11-181-1/+2
| | | | | | Review URL: http://codereview.chromium.org/11431 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5597 0039d316-1c4b-4281-b951-d872f2087c98
* RandUInt -> RandUint to match the style of other Uint functions.deanm@chromium.org2008-11-141-1/+1
| | | | | | Review URL: http://codereview.chromium.org/10767 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5517 0039d316-1c4b-4281-b951-d872f2087c98
* Review URL: http://codereview.chromium.org/10958mbelshe@google.com2008-11-142-19/+8
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5509 0039d316-1c4b-4281-b951-d872f2087c98
* Change to integrate SystemMonitor changes into chrome.mbelshe@google.com2008-11-142-8/+19
| | | | | | | | | | | | This enables the dynamic detection of battery status changes so that we can turn on/off the hi-res timer. Review URL: http://codereview.chromium.org/10264 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5489 0039d316-1c4b-4281-b951-d872f2087c98
* Fix build bustage, I missed this file with my base namespace changes.brettw@google.com2008-11-141-3/+3
| | | | | | Review URL: http://codereview.chromium.org/10738 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5448 0039d316-1c4b-4281-b951-d872f2087c98
* Add Terminate() to the Process object, have RenderProcessHost use this to ↵brettw@google.com2008-11-141-3/+3
| | | | | | | | | | avoid some more Windows specific code. Move Process and SharedMemory into the base namespace (most changes). Review URL: http://codereview.chromium.org/10895 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5446 0039d316-1c4b-4281-b951-d872f2087c98
* Update the user delay histogram for the SafeBrowsing.paulg@google.com2008-11-142-3/+5
| | | | | | Review URL: http://codereview.chromium.org/10916 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5434 0039d316-1c4b-4281-b951-d872f2087c98
* Add histograms to measure new SafeBrowsing performance.paulg@google.com2008-11-146-14/+81
| | | | | | Review URL: http://codereview.chromium.org/10712 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5423 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce memory consumption by keeping the SafeBrowsingpaulg@google.com2008-11-135-83/+182
| | | | | | | | database closed when not processing updates. Review URL: http://codereview.chromium.org/10643 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5381 0039d316-1c4b-4281-b951-d872f2087c98
* Handle the possibility of failure when starting apaulg@google.com2008-11-116-26/+10
| | | | | | | | | | SafeBrowsing update transaction. If we fail to start the transaction, we report the error to the protocol manager which aborts the update process. Review URL: http://codereview.chromium.org/9778 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5207 0039d316-1c4b-4281-b951-d872f2087c98
* make sure we match all the tests and files that linux has running. We were ↵pinkerton@google.com2008-11-111-0/+8
| | | | | | | | never building process_posix, but now the newly added unit tests use it. Review URL: http://codereview.chromium.org/10221 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5175 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for 256 bit full hashes to the new implementation.paulg@google.com2008-11-1112-608/+1045
| | | | | | | | | 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
* Update the SafeBrowsing protocol version to 2.2, which handlespaulg@google.com2008-11-071-3/+3
| | | | | | | | | | | - Zero sized chunks - Redirect URL format changes http://crbug.com/3418 Review URL: http://codereview.chromium.org/10222 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5028 0039d316-1c4b-4281-b951-d872f2087c98
* Trivial patch: add whitespace to some SQL statements to turn "INSERT INTO ↵pkasting@chromium.org2008-10-292-7/+5
| | | | | | | | | foo(bar,baz)VALUES(?,?)" into "INSERT INTO foo (bar, baz) VALUES (?,?)" (which is the way we have it in most of our code). This was annoying me while I tried to track down cases where we omitted the appropriate fieldnames from our SQL statements. Review URL: http://codereview.chromium.org/8855 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4145 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a minor memory leak.paulg@google.com2008-10-294-8/+6
| | | | | | | | | BUG=1340229 Review URL: http://codereview.chromium.org/8690 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4117 0039d316-1c4b-4281-b951-d872f2087c98