summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history
Commit message (Collapse)AuthorAgeFilesLines
* Removing the logging on history thread since the crashhuanr@chromium.org2009-11-165-211/+5
| | | | | | | | | | | is fixed. BUG=16591 TEST = none Review URL: http://codereview.chromium.org/384073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32113 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: fix uninit warnings when building -Os.agl@chromium.org2009-11-161-1/+1
| | | | | | http://codereview.chromium.org/401002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32105 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes almost all of the rest of lint errors in the chrome/ directory (minus ↵erg@google.com2009-11-139-38/+15
| | | | | | | | 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
* For the immediate milestone, exclude History and Thumbnails from being ↵mrossetti@chromium.org2009-11-112-1/+24
| | | | | | | | | | | backed up by Time Machine. The bug describes appropriate long-term solutions to this problem. BUG=259595 TEST=Launch Chrome. Inspect the following files found in ~/Library/Application Support/Chromium/Default/: a) History, b) History-journal, c) Thumbnails, and d) Thumbnails-journal and verify that they are not being backed up by Time Machine. Review URL: http://codereview.chromium.org/387016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31644 0039d316-1c4b-4281-b951-d872f2087c98
* Seventh patch in making destructors of refcounted objects private.jam@chromium.org2009-11-065-6/+21
| | | | | | | BUG=26749 Review URL: http://codereview.chromium.org/371006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31192 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate QueryOptions::most_recent_visit_only. All non-unittest consumers ↵pkasting@chromium.org2009-11-0310-88/+32
| | | | | | | | | | of this set it to true, so just turn it on unconditionally. BUG=none TEST=none Review URL: http://codereview.chromium.org/341087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30880 0039d316-1c4b-4281-b951-d872f2087c98
* Unittest for fix to allow navigation when there is no history DB.pkasting@chromium.org2009-11-026-25/+43
| | | | | | | | BUG=25822 TEST=none Review URL: http://codereview.chromium.org/343067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30744 0039d316-1c4b-4281-b951-d872f2087c98
* Show a warning when the history files can't be read correctly.pkasting@chromium.org2009-10-306-19/+18
| | | | | | | | | | This re-plumbs the existing "TooNew" codepath to handle arbitrary error messages. BUG=25822 TEST=Make your history files non-readable, run Chrome (Release), make sure you get a warning dialog. Review URL: http://codereview.chromium.org/342048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30642 0039d316-1c4b-4281-b951-d872f2087c98
* Move the json-related files into a separate json directory. This hopefully alsobrettw@chromium.org2009-10-231-2/+2
| | | | | | | | | | | makes the naming of string_escape more clear (it's actually JSON-specific). Move the files into the base namespace. TEST=none BUG=none Review URL: http://codereview.chromium.org/316016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29934 0039d316-1c4b-4281-b951-d872f2087c98
* Roll WebKit up to 49830 and fix a build error caused by that revision.jorlow@chromium.org2009-10-201-1/+1
| | | | | | | | | | TBR=yutak TEST=none BUG=none Review URL: http://codereview.chromium.org/294017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29489 0039d316-1c4b-4281-b951-d872f2087c98
* First fix to minimize copying of image data.erg@google.com2009-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first of multiple patches that clean up handling of memory regarding images. Previously, the code did several memcpy()s or equivalents. This change: - Creates an abstract interface RefCountedMemory which provides access to the front() of a memory range and the size() of it. It is a RefCountedThreadSafe. - Adds a RefCountedStaticMemory class which isa RefCountedMemory. - Pushes RefCountedBytes up into base/ from chrome/ and make it conform to RefCountedMemory. - Have ResourceBundle return RefCountedStaticMemory to the mmaped() or DLL loaded resources instead of memcpy()ing them. - General cleanups to minimize copies in constructing RefCountedBytes. - Use the above consistent interface in the BrowserThemeProvider, along with special casing the loading of the new tab page background. This patch is mostly cleanups and there should only be a slight performance gain if any. Most of the real speedups should come in subsequent patches. BUG=http://crbug.com/24493 TEST=Slightly faster on Perf bot; does not introduce crashes. Review URL: http://codereview.chromium.org/288005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29412 0039d316-1c4b-4281-b951-d872f2087c98
* Move the sqlite error handler to a single locationcpu@chromium.org2009-10-153-22/+10
| | | | | | | | | | | | | | - Eliminate code duplication - Cover other 3 databases - Still doing the same as before, sending UMA histograms BUG=11908 TEST=none Review URL: http://codereview.chromium.org/270101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29073 0039d316-1c4b-4281-b951-d872f2087c98
* More style nits.erg@google.com2009-10-149-30/+29
| | | | | | | | (Working on cleaning chrome/ so hopefully we can lint it by default.) Review URL: http://codereview.chromium.org/274040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28971 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Valgrind UMR errors by initializing thumbnail pixels.huanr@chromium.org2009-10-091-0/+1
| | | | | | | | | | | Original code review: http://codereview.chromium.org/270040 BUG=17067 TEST=none Review URL: http://codereview.chromium.org/264024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28586 0039d316-1c4b-4281-b951-d872f2087c98
* Move more ICU-dependent stuff from base into base/i18n. Some test stuff alsobrettw@chromium.org2009-10-091-1/+1
| | | | | | | | | | | | depended on this, so to make the DEPS work out, I made a new base/test directory where I moved the testing-related files into a new directory base/test. TEST=none BUG=none Review URL: http://codereview.chromium.org/266038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28569 0039d316-1c4b-4281-b951-d872f2087c98
* Add the ability to unload the HistoryBackend.pkasting@chromium.org2009-10-082-58/+115
| | | | | | | | | | A small number of places used accessors like in_memory_url_database() or backend_loaded() with the expectation that if they weren't already functional, the history system was in the process of making them so. I elected to make both of these functions that triggered lazy backend initialization. BUG=23400 TEST=none Review URL: http://codereview.chromium.org/267019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28461 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: fix possible leak in VisitSegmentDatabase.mattm@chromium.org2009-10-081-2/+2
| | | | | | | | | | | | If we get a non-zero segment_id, a zero segment_id, and another non-zero segment_id, the pud for the zero segment_id will be leaked. A non-zero segment_id shouldn't happen since it refers to a primary-key in the segments table, but this changes it to check directly whether a pud has been created, and thus makes it more error-proof. This should be safe, as pud is only stored into the list in two places, in the first it is immediately replaced with a new pud, in the second it is storing the final pud (if any.) CID=6379 TEST=none BUG=none Review URL: http://codereview.chromium.org/265027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28445 0039d316-1c4b-4281-b951-d872f2087c98
* Move the JPEG and PNG codecs from base/gfx to app/gfx/codec. Move the classesbrettw@chromium.org2009-10-036-20/+20
| | | | | | | | | | | | | | | into the gfx namespace. Combine the PNGEncoder and PNGDecoder. There were separate when we had different executables for the browser and renderer, and linked the encoder only in one of them (which saved us some space used by libpng). This hasn't been the case for years, so combining them (again) makes sense. TEST=none BUG=none Review URL: http://codereview.chromium.org/243076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27930 0039d316-1c4b-4281-b951-d872f2087c98
* Add a Clear() function to MRUCache. This will be useful in my MemoryPurger ↵pkasting@chromium.org2009-10-021-2/+2
| | | | | | | | | | class. Technically you can call ShrinkToSize(0), but that's both less clear and slower. BUG=23400 TEST=none Review URL: http://codereview.chromium.org/257024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27892 0039d316-1c4b-4281-b951-d872f2087c98
* Convert history to use new sql wrappers. Enhance wrappers in several ways tobrettw@chromium.org2009-10-0229-1194/+971
| | | | | | | | | | support the needs of history. BUG=none TEST=covered by unit tests Review URL: http://codereview.chromium.org/246053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27832 0039d316-1c4b-4281-b951-d872f2087c98
* Add some initial code for the top sites service. This will be a replacement forbrettw@chromium.org2009-10-024-0/+498
| | | | | | | | | | | | | | | | | | | | | | | | | | | the thumbnail database, and will also replace the ThumbnailStore which was the previous replacement we didn't ship. This component will be very much like the ThumbnailStore wtih the addition of the actual most visited data (not just thumbnails) and that it is threadsafe. This class is designed to be called on any thread. When it is complete, thumbnails will be added to it from the UI thread of the browser. Requests for thumbnails and the most visited data can be serviced directly on the I/O thread without going through the UI thread, and since the data is cached, the request won't also have to go through the history thread. The current state is that it cqan store and update the the most visited list and thumbnails. There are unit tests covering this behavior. I also added support for redirect ranking to ThumbnailScore. This is to duplicated the ranking function in history currently, where it prefers thumbnails closer to the end of a redirect chain. Since we won't be using the history service and are only storing thumbnails for the most visited items, we have to track the redirect index ourselves. BUG=none TEST=covered by unit tests (hopefully!) Review URL: http://codereview.chromium.org/251002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27824 0039d316-1c4b-4281-b951-d872f2087c98
* Add UMA histograms for sqlite errorscpu@chromium.org2009-10-021-0/+25
| | | | | | | | | | | | | - cookies - history db TEST=none BUG=none Review URL: http://codereview.chromium.org/243055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27810 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 27389.darin@chromium.org2009-09-301-2/+2
| | | | | | Review URL: http://codereview.chromium.org/246027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27594 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Initialize got_thumbnail_callback_, query_url_success_, and ↵jhawkins@chromium.org2009-09-291-2/+7
| | | | | | | | | | | redirect_query_success_ in the constructor. CID=1653 BUG=none TEST=none Review URL: http://codereview.chromium.org/251031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27525 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Initialize all member variables in the default constructor.jhawkins@chromium.org2009-09-281-4/+16
| | | | | | | | | CID=1423 BUG=none TEST=none Review URL: http://codereview.chromium.org/249024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27418 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 27379, in hopes of fixing browser_tests.senorblanco@chromium.org2009-09-281-2/+2
| | | | | | | | TBR=darin Review URL: http://codereview.chromium.org/248021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27389 0039d316-1c4b-4281-b951-d872f2087c98
* Assert that thread-safe reference counting is used withdarin@chromium.org2009-09-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | cross-thread NewRunnableMethod. This assertion caught such an error in VisitedLinkMaster! My approach, modify RunnableMethodTraits<T> to assert that when ReleaseCallee happens on a different thread from RetainCallee that the type supports thread-safe reference counting. I do this by adding a static method to both RefCounted<T> and RefCountedThreadSafe<T>. This results in a little ugliness in cases where people implement AddRef and Release by hand (to make the no-ops). There may be a nicer way to deal with those few cases. R=brettw BUG=none TEST=none Review URL: http://codereview.chromium.org/251012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27379 0039d316-1c4b-4281-b951-d872f2087c98
* Re-ban chrome:// URLs from being added to history until I can craft a more ↵pkasting@chromium.org2009-09-251-2/+4
| | | | | | | | | | fine-grained solution. BUG=23076 TEST=Hit ctrl-t, then ctrl-h, and verify you didn't just add "New Tab" to your history. Review URL: http://codereview.chromium.org/248005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27253 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Initialize statement_cache_ in the constructor.jhawkins@chromium.org2009-09-241-2/+4
| | | | | | | | | CID=1640 BUG=none TEST=none Review URL: http://codereview.chromium.org/225020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27140 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Initialize statement_cache_ in the constructor.jhawkins@chromium.org2009-09-241-1/+5
| | | | | | | | | CID=1608 BUG=none TEST=none Review URL: http://codereview.chromium.org/222024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27136 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Initialize statement_cache_ in the constructor.jhawkins@chromium.org2009-09-241-1/+4
| | | | | | | | | CID=1602 BUG=none TEST=none Review URL: http://codereview.chromium.org/223026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27135 0039d316-1c4b-4281-b951-d872f2087c98
* Add about: and chrome:* to history. Patch by Pierre-Antoine LaFayette (see ↵pkasting@chromium.org2009-09-241-3/+3
| | | | | | | | | http://codereview.chromium.org/193071 ), r=me,brettw. BUG=2958 TEST=Visit "about:", then hit ctrl-h and make sure it's in your history. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27131 0039d316-1c4b-4281-b951-d872f2087c98
* Add some new histograms for history, and UMA-enable a few others.brettw@chromium.org2009-09-233-9/+36
| | | | | | | | BUG=19773 TEST=none Review URL: http://codereview.chromium.org/212014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26939 0039d316-1c4b-4281-b951-d872f2087c98
* Switch history thread back to base::Thread. Sync unit tests require more ↵chron@chromium.org2009-09-211-2/+7
| | | | | | | | | | than one history thread. We hope to have a hard unit test dependency on buildbot soon, but we need to fix our tests again now. BUG=22056 Review URL: http://codereview.chromium.org/215023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26709 0039d316-1c4b-4281-b951-d872f2087c98
* Some history backend fixes for database corruption.shess@chromium.org2009-09-172-0/+20
| | | | | | | | | | | | | | | Don't enter an infinite loop in GetLastSegmentID() when traversing the referring_visit list. Don't return rows from visits table where a specific visit_id was passed but some other visit_id was returned. Don't update visits table with rows who's referring_visit refers to the visit itself. BUGS=20321 TEST=Don't hang with Kelly's profile. I guess Kelly could test? Review URL: http://codereview.chromium.org/206041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26513 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed a few data races on reference counters.timurrrr@chromium.org2009-09-171-1/+2
| | | | | | | BUG=18488 Review URL: http://codereview.chromium.org/215011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26476 0039d316-1c4b-4281-b951-d872f2087c98
* Replace a bunch of hardcoded URLs with constants from url_constants.hbrettw@chromium.org2009-09-151-1/+2
| | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/193092 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26263 0039d316-1c4b-4281-b951-d872f2087c98
* Add a new wrapper for sqlite. This is mostly a large cleanup of the existingbrettw@chromium.org2009-09-112-134/+100
| | | | | | | | | | | | | | | one, combined with the statement cache in a nice way. It is designed to entirely wrap sqlite so that we can catch corrupt errors in the future and "do something" when we get them without having to change all the calling code. There is also a new meta_table file which is almost exactly like the old one but which uses the new sql interface. This patch changes Chrome's history TextDatabase to use this new wrapper as a proof of concept, because this usage is relatively well-confined. Review URL: http://codereview.chromium.org/199047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26022 0039d316-1c4b-4281-b951-d872f2087c98
* While importing favicon, make sure there is an entry in the history db.kuchhal@chromium.org2009-09-113-7/+87
| | | | | | | | | | This will match with what history db does for regular bookmarked URLs with favicons - when history db is cleaned, we keep an entry in the db with 0 visits as long as that url is bookmarked. BUG=13338 Review URL: http://codereview.chromium.org/193053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26014 0039d316-1c4b-4281-b951-d872f2087c98
* Metrics for the in-memory DB size to see if we spend too much time loading it,brettw@chromium.org2009-09-111-0/+7
| | | | | | | | | | and how big it ends up being. BUG=none TEST=none Review URL: http://codereview.chromium.org/193061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25957 0039d316-1c4b-4281-b951-d872f2087c98
* Use Scoped[Bstr,ComPtr,Variant] instead of their ATL equivalents to reduce ↵jhawkins@chromium.org2009-09-101-14/+16
| | | | | | | | | | dependencies on ATL. BUG=5027 TEST=none Review URL: http://codereview.chromium.org/200045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25879 0039d316-1c4b-4281-b951-d872f2087c98
* Retry 25770 after fixing Valgrind issue.huanr@chromium.org2009-09-103-3/+33
| | | | | | | | | | | | | Enable database logging on history thread. Original review: http://codereview.chromium.org/198011 BUG=16591 TEST=History UI test Review URL: http://codereview.chromium.org/194067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25842 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r25770 due to valgrind failures on Linux.huanr@chromium.org2009-09-091-23/+3
| | | | | | | | | TEST=none. BUG=none. Review URL: http://codereview.chromium.org/199065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25781 0039d316-1c4b-4281-b951-d872f2087c98
* Enable database logging on history thread.huanr@chromium.org2009-09-091-3/+23
| | | | | | | | | BUG=16591 TEST=History UI test Review URL: http://codereview.chromium.org/198011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25770 0039d316-1c4b-4281-b951-d872f2087c98
* Move the "history is too new" dialog out oftony@chromium.org2009-09-051-17/+3
| | | | | | | | | | | | | chrome/browser/history/history.cc. Instead use a notification that Browser picks up and delegates to BrowserWindow. Include implementations for Windows, Linux GTK+, and Linux Views (sorry, no mac impl). Review URL: http://codereview.chromium.org/200023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25556 0039d316-1c4b-4281-b951-d872f2087c98
* Adding in memory log of history visit database. Thishuanr@chromium.org2009-09-024-0/+178
| | | | | | | | | | | | log will be saved in crash dump (to be done in next CL) to help debug the corruption in history thread. TEST=Added unit test. BUG=16591 Review URL: http://codereview.chromium.org/187004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25276 0039d316-1c4b-4281-b951-d872f2087c98
* Remove most Sleeps from RedirectTest and wait properly.phajdan.jr@chromium.org2009-09-021-30/+14
| | | | | | | | | | | | Not fixing any Top15 flakiness, but removes the ugly polling pattern and prevents it from being copy-pasted into new tests. TEST=Covered by ui_tests. BUG=none Review URL: http://codereview.chromium.org/183037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25176 0039d316-1c4b-4281-b951-d872f2087c98
* Replace the RenderProcessHost.PID function that returns the OS-generatedbrettw@chromium.org2009-08-311-2/+2
| | | | | | | | | | | | | | | | | | | | 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
* Adds a FaviconService class tied to the profile.arv@google.com2009-08-283-90/+71
| | | | | | | | | | | | | | | | | | | Original issue: http://codereview.chromium.org/115212/show The favicons service is the entry point to getting favicons. Make the DOMUIFactory handle the favicons of DOMUI pages so since DOMUI pages are never added to the history. BUG=5840 TEST=Open a new window and open history and downloads (Ctrl+H and Ctrl+J) in this window. Then close the window and open the NTP. The recently closed windows/tabs should show the favicons for the hsitroy and downloads page. Review URL: http://codereview.chromium.org/178001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24806 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Fix a ton of compiler warnings."tony@chromium.org2009-08-284-19/+15
| | | | | | | | | | | 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