summaryrefslogtreecommitdiffstats
path: root/sql
Commit message (Collapse)AuthorAgeFilesLines
* Rewrite scoped_ptr<T>(NULL) to use the default ctor in sql/.dcheng@chromium.org2013-06-131-3/+1
| | | | | | | | | | | This is the result of running the rewrite_scoped_ptr_ctor_null tool across all files built on Linux in the sql/ directory. BUG=173286 Review URL: https://chromiumcodereview.appspot.com/16866008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206127 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of strings headers in rlz/, sandbox/, skia/, sql/, sync/.avi@chromium.org2013-06-114-5/+5
| | | | | | | | | | BUG=247723 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16358024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205458 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of utf_string_conversions.h in google_apis/, gpu/, ↵avi@chromium.org2013-06-072-2/+2
| | | | | | | | | | | | ipc/, media/, ppapi/, printing/, remoting/, rlz/, skia/, sql/, sync/, third_party/, tools/, webkit/, win8/. BUG=none TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/15995038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204967 0039d316-1c4b-4281-b951-d872f2087c98
* [sql] Enable writable_schema during integrity_check.shess@chromium.org2013-06-061-10/+27
| | | | | | | | | | | | | | | | | | | | | Logging integrity_check for corruption in thumbnail_database.cc has caught one bit of info, and a bunch of empty results. I suspect that "PRAGMA integrity_check" is itself failing. writable_schema enables an internal RecoveryMode flag which allows SQLite to work through certain simple forms of corruption. More Sqlite.SizeKB.Thumbnail results have come in. 8M covers >90% of Favicon databases and seems like a reasonable bet. Tweak the chance of running the integrity check. Previously, SQLITE_CORRUPT was overwhelming the other errors, now it is around 3% of cases caught (on dev channel). This aims to get around 25%-30%. BUG=240396 Review URL: https://chromiumcodereview.appspot.com/16406002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204645 0039d316-1c4b-4281-b951-d872f2087c98
* Disable sqlite lookaside buffers by default.rmcilroy@chromium.org2013-06-061-0/+7
| | | | | | | | | | | | | | | | Sqlite by default allocates 50KB per connection for use as a lookaside buffer for small object allocation. With the malloc implementations we use, this doesn't seem to help gain us any performance advantage, while increasing memory overhead, therefore this CL disables sqlite lookaside buffers by default. BUG=chromium:243769 TEST=Ran page_cycler perf test in Linux and Android and saw no noticable degradation. Examined traceview didn't see an increase in the time spent on the history or database threads. Review URL: https://chromiumcodereview.appspot.com/16356007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204623 0039d316-1c4b-4281-b951-d872f2087c98
* Update sync/, sql/, and printing/ to use scoped_refptr<T>::get() rather than ↵rsleevi@chromium.org2013-06-031-1/+1
| | | | | | | | | | | | | implicit "operator T*" Linux fixes BUG=110610 TBR=darin Review URL: https://chromiumcodereview.appspot.com/16298002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203651 0039d316-1c4b-4281-b951-d872f2087c98
* Remove last client of sql::DiagnosticErrorDelegate.shess@chromium.org2013-05-233-62/+0
| | | | | | | | | | | In the first pass, there was a problem with histograms. I do not recall what the problem was, so removing things. BUG=none Review URL: https://chromiumcodereview.appspot.com/15104003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201895 0039d316-1c4b-4281-b951-d872f2087c98
* Post integrity_check data for corrupt thumbnail databases.shess@chromium.org2013-05-222-0/+26
| | | | | | | | | | | | | | | | | | | | | Analyzing the results from DatabaseErrorCallback() show a lot of SQLITE_CORRUPT opening the database and setting up the meta table. Add additional diagnostic information for these cases to direct future development, and also dial down the amount of data uploaded to allow finding other cases more easily. For SQLITE_CORRUPT and SQLITE_READONLY, only give the chance to report on first encounter. Cross-platform results are inconsistent. On OSX, almost all of the SQLITE_CORRUPT cases are in initialization, whereas on Windows there are more in code which updates the database. For these errors, it is reasonable to expect any future call to return the error again, so it is pointless to let it get multiple attempts. BUG=240396 Review URL: https://chromiumcodereview.appspot.com/15327004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201494 0039d316-1c4b-4281-b951-d872f2087c98
* Record startup sizes for tagged SQLite databases.shess@chromium.org2013-05-211-0/+15
| | | | | | | | BUG=240396 Review URL: https://chromiumcodereview.appspot.com/15499003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201211 0039d316-1c4b-4281-b951-d872f2087c98
* Dump additional error info for thumbnail database.shess@chromium.org2013-05-172-0/+32
| | | | | | | | | | | | | The union of SQLite error messages and platform errno is a potentially large space which may not be reasonable to histogram. Instead, randomly dump a crash report with diagnostic information which can be correlated with histograms. BUG=240396 Review URL: https://chromiumcodereview.appspot.com/15131008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200759 0039d316-1c4b-4281-b951-d872f2087c98
* Histogram versions and extended error codes for SQLite databases.shess@chromium.org2013-05-153-35/+34
| | | | | | | | | | | | | | | | | | | Track database versions across the fleet for purposes of making decisions about whether old migration code can be removed. As part of this, refactor histogram code to key off a per-database tag rather than histogram name, and to log in a form which can be fanned out via the field trial logic in histograms.xml [FYI michaeln from webkit/OWNERS, erikwright from {chrome,content}/net/OWNERS, sky for chrome/browser/history/OWNERS] BUG=none TBR=michaeln@chromium.org, erikwright@chromium.org, sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/14976003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200216 0039d316-1c4b-4281-b951-d872f2087c98
* Deeper histogram for SQLITE_IOERR.shess@chromium.org2013-04-301-0/+9
| | | | | | | | | | | | | | Sqlite.Error records the basic SQLite error codes. Most of the extended codes are under SQLITE_IOERR, add a new histogram to record those. [Relanding https://chromiumcodereview.appspot.com/14439007/] BUG=none Review URL: https://chromiumcodereview.appspot.com/14590003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197385 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 197147 "Deeper histogram for SQLITE_IOERR."jar@chromium.org2013-04-301-9/+0
| | | | | | | | | | | | | | | | | | > Deeper histogram for SQLITE_IOERR. > > Sqlite.Error records the basic SQLite error codes. Most of the > extended codes are under SQLITE_IOERR, add a new histogram to record > those. > > BUG=none > > Review URL: https://chromiumcodereview.appspot.com/14439007 TBR=shess@chromium.org Review URL: https://codereview.chromium.org/14555006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197196 0039d316-1c4b-4281-b951-d872f2087c98
* Deeper histogram for SQLITE_IOERR.shess@chromium.org2013-04-291-0/+9
| | | | | | | | | | | | Sqlite.Error records the basic SQLite error codes. Most of the extended codes are under SQLITE_IOERR, add a new histogram to record those. BUG=none Review URL: https://chromiumcodereview.appspot.com/14439007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197147 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite std::string("") to std::string(), Linux edition.dcheng@chromium.org2013-04-091-1/+1
| | | | | | | | | | | | | | | | | | | This patch was generated by running the empty_string clang tool across the Chromium Linux compilation database. Implicitly or explicitly constructing std::string() with a "" argument is inefficient as the caller needs to emit extra instructions to pass an argument, and the constructor needlessly copies a byte into internal storage. Rewriting these instances to simply call the default constructor appears to save ~14-18 kilobytes on an optimized release build. BUG=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=193020 Review URL: https://codereview.chromium.org/13145003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193040 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Rewrite std::string("") to std::string(), Linux edition."dcheng@chromium.org2013-04-091-1/+1
| | | | | | | | | | | | | | This reverts commit e59558b78e8c6a1b0bd916a724724b638c3c91b6. Revert "Fix build after r193020." This reverts commit 558a35897f6b3ffbcaefde927c1f150b815d140a. Revert "Really fix build after r193020." This reverts commit e3748a79b523a8d365d4a33ef986eebb4186fa78. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193030 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite std::string("") to std::string(), Linux edition.dcheng@chromium.org2013-04-091-1/+1
| | | | | | | | | | | | | | | | | This patch was generated by running the empty_string clang tool across the Chromium Linux compilation database. Implicitly or explicitly constructing std::string() with a "" argument is inefficient as the caller needs to emit extra instructions to pass an argument, and the constructor needlessly copies a byte into internal storage. Rewriting these instances to simply call the default constructor appears to save ~14-18 kilobytes on an optimized release build. BUG=none Review URL: https://codereview.chromium.org/13145003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193020 0039d316-1c4b-4281-b951-d872f2087c98
* [Cleanup] Remove StringPrintf from global namespacegroby@chromium.org2013-03-181-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | use of StringPrintf now requires prefixing with base:: or a per-scope using directive TBR'd: abodenha: chrome/service brettw: content, third_party, webkit darin: base, chrome/browser, chrome/renderer dgarret: courgette enne: cc fischmann: media gbillock: sql joi: google_apis,components rsleevi: net, crypto sky: chrome/test thestig: printing, chrome/common, tsepez: ipc wez: remoting yfriedman: testing/android NOTRY=true R=brettw@chromium.org TBR=joi@chromium.org, rsleevi@chromium.org, enne@chromium.org, thestig@chromium.org, darin@chromium.org, abodenha@chromium.org, sky@chromium.org, dgarret@chromium.org, tsepez@chromium.org, fishman@chromium.org, wez@chromium.org, gbillock@chromium.org, yfriedman@chromium.org BUG= Review URL: https://codereview.chromium.org/12767006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188857 0039d316-1c4b-4281-b951-d872f2087c98
* Invoke the iOS hook from TestSuite so each run_all_unittests.cc file does notlliabraa@chromium.org2013-03-151-2/+0
| | | | | | | | | | | | have to remember to install MainHook. BUG=None Review URL: https://chromiumcodereview.appspot.com/12321117 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188376 0039d316-1c4b-4281-b951-d872f2087c98
* Move file_path.h to base/files.brettw@chromium.org2013-02-241-1/+1
| | | | | | TBR=sky git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184344 0039d316-1c4b-4281-b951-d872f2087c98
* Implement sql::Connection::RazeAndClose().shess@chromium.org2013-02-074-69/+255
| | | | | | | | | | | | | | | | | | | Raze() clears out the database, but cannot be called within a transaction. Close() can only be called once all statements have cleared. Error callbacks happen while executing statements (thus often in a transaction, and at least one statement is outstanding). RazeAndClose() forcibly breaks outstanding transactions, calls Raze() to clear the database, then calls Close() to close the handle. All future operations against the database should fail safely (without affecting storage and without crashing). BUG=166419, 136846 Review URL: https://chromiumcodereview.appspot.com/12096073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181152 0039d316-1c4b-4281-b951-d872f2087c98
* Linux/ChromeOS Chromium style checker cleanup, sql/ edition.rsleevi@chromium.org2013-02-064-8/+8
| | | | | | | | | | | Automated clean up of style checker errors that were missed due to the plugin not being executed on implementation files. BUG=115047 Review URL: https://chromiumcodereview.appspot.com/12211033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181004 0039d316-1c4b-4281-b951-d872f2087c98
* Add FilePath to base namespace.brettw@chromium.org2013-02-023-4/+7
| | | | | | | This updates headers that forward-declare it and a few random places to use the namespace explicitly. There us a using declaration in file_path.h that makes the rest compile, which we can do in future passes. Review URL: https://codereview.chromium.org/12163003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180245 0039d316-1c4b-4281-b951-d872f2087c98
* Only HistogramBase is used outside of base/metrics.kaiwang@chromium.org2013-01-231-2/+2
| | | | | | | | | | | | | | So client code of histogram will see a simpler interface. This also makes adding SparseHistogram to existing metrics framework possible. This CL depends on https://codereview.chromium.org/11682003/ So please review that one first. TBR=sky@chromium.org,erikwright@chromium.org BUG=139612 Review URL: https://chromiumcodereview.appspot.com/11615008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178242 0039d316-1c4b-4281-b951-d872f2087c98
* Fixing null pointer dereference.glotov@chromium.org2013-01-172-3/+4
| | | | | | | | | | BUG=chromium:158178 TEST=units,make sure such SEGV doesnt happen on x86-generic-bot (where it pops periodically now) Review URL: https://chromiumcodereview.appspot.com/11886065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177399 0039d316-1c4b-4281-b951-d872f2087c98
* Make sql build on Win64jschuh@chromium.org2013-01-111-0/+4
| | | | | | | | | | BUG=166496 BUG=167187 TBR=shess Review URL: https://chromiumcodereview.appspot.com/11860013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176397 0039d316-1c4b-4281-b951-d872f2087c98
* Bake targeted error histogram support directly into sql::Connection.shess@chromium.org2013-01-032-0/+36
| | | | | | | | | | | | Previously there was a convoluted template system to unique histogram names for purposes of tracking database errors separately. This was needed due to the static cache used by the histogram macros. Instead, just log the histogram manually without using a static cache. Additionally, pull the histogram functionality right up into the connection, rather than requiring formalized delegation to get it. BUG=none Review URL: https://chromiumcodereview.appspot.com/11474030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175055 0039d316-1c4b-4281-b951-d872f2087c98
* Add diagnostics to debug database open problems.shess@chromium.org2012-12-071-0/+15
| | | | | | | | | | | | | Currently the histograms are binned together for all errors, but knowing open-specific errors is helpful for dealing with problems on open. BUG=159490 Review URL: https://chromiumcodereview.appspot.com/11468024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171862 0039d316-1c4b-4281-b951-d872f2087c98
* Move scoped_temp_dir from base to base/filesbrettw@chromium.org2012-11-164-9/+9
| | | | | | | | | | Also add to base namespace. BUG= Review URL: https://codereview.chromium.org/11359217 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168281 0039d316-1c4b-4281-b951-d872f2087c98
* Handle cookie-file corruption found during open.shess@chromium.org2012-11-101-1/+8
| | | | | | | | | | | | | | | | | | KillDatabaseErrorDelegate cannot Raze() if the corruption is found while opening the databse, because by the time the callback happens the database has been closed. Add support for setting a flag for the database-opening code to check. Additionally, errors detected when executing or preparing statements were not forwarded to the error delegate, which could let them sneak by without notice. BUG=159490 Review URL: https://chromiumcodereview.appspot.com/11358170 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167023 0039d316-1c4b-4281-b951-d872f2087c98
* Make sql::Connection::Raze() more robust against corruptions.shess@chromium.org2012-11-103-21/+63
| | | | | | | | | | | | | | Corruptions resulting from the first page showing a different database size than the filesystem shows cause very basic functions to fail. This does fewer queries against the corrupt database, and also enables a magic pragma to let it make better progress. BUG=159490 Review URL: https://chromiumcodereview.appspot.com/11369126 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167019 0039d316-1c4b-4281-b951-d872f2087c98
* Move ErrorDelegate to its own file and add static utility functions to ↵pkotwicz@chromium.org2012-10-185-28/+135
| | | | | | | | | | | | | ErrorDelegate BUG=151841 Test=None R=shess, erikwright TBR=cpu Review URL: https://chromiumcodereview.appspot.com/11141012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162647 0039d316-1c4b-4281-b951-d872f2087c98
* Remove ref counting on sql::ErrorDelegatepkotwicz@chromium.org2012-10-175-68/+70
| | | | | | | | | | | | BUG=151841 Test=None R=shess TBR=jamesr,erikwright Review URL: https://chromiumcodereview.appspot.com/11111021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162443 0039d316-1c4b-4281-b951-d872f2087c98
* Remove {base,net}_java dependencies from GYP client targets on Android.pliard@chromium.org2012-09-101-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | On Android, some GYP client targets were explicitly depending on both the native and Java sides of a library. This removes the dependencies to {base,net}_java and make the native side ('base' and 'net) of these libraries depend on their Java counterpart. On Android it rarely makes sense to depend on a single side of a Java/C++ library. The {base,net}_java can now be considered as "private" targets although GYP does not support this concept unfortunately (AFAICT). Note that I made sure that the resulting APKs' size is unchanged. Additionally, this CL removes 'base_java' (i.e. does not replace it with 'base') from the targets including 'build/apk_test.gypi'. This dependency should not have been there (in the wrong layer) in the first place. It's needed by ChromeNativeTestActivity.java which clients should not know about. BUG=146323 TBR=lipalani,sky,willchan,brettw Review URL: https://chromiumcodereview.appspot.com/10913083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155737 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 152946 - Replace HistoryQuickProvider protobuf-based caching with an ↵ricow@chromium.org2012-08-231-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SQLite-based database. The protobuf-based cache was only being read at startup and written at shutdown. (Except that when the cache could not be read at startup the cache would immediately be saved upon private data reconstruction from the History database.) With the new implementation using an SQLite database for the HQP cache the private data will be restored from the cache database at startup and continually updated during normal operation. There is no need to flush or write the cache at shutdown as it is constantly kept up-to-date. Detailed comments about the changes made in this CL can be found in the document shared separately. Previous reviewers: sky, pkasting, shess. BUG=95686, 95876, 131668 TEST=New tests added, old tests updated, all tests pass. To manually verify changes: NOTE: For tests using chrome://omnibox be sure to check the "Show results per provider" and then look at the results for the HistoryQuickProvider. 1) New visits: Type an URL never visited before. Bring up new tab. Start typing the URL or parts of the page title or both and verify that the page is offered as a suggestion. 2) New visits: Type an URL never visited before. Do search using chrome://omnibox. New visit should show. 3) Delete visit: Visit some pages and verify they have been recorded. Bring up history and delete one of the visits. Check via chrome://omnibox that it was deleted. 4) Clear history: Visit some pages. Clear the visit history. Check via chrome://omnibox that none of the visits are still returned by the HQP. 5) Updated site: Create a local page and visit it. Search using chrome://omnibox by page title and verify it can be found. Change the page title dramatically and revisit the page. Verify via chrome://oomnibox that the page can be found by words from the new title. Previously reviewed as: http://codereview.chromium.org/10477018/. 10477018 was reverted due to memory leaks detected by build bots. Review URL: https://chromiumcodereview.appspot.com/10837244 TBR=mrossetti@chromium.org This is causing performance regressions across a range of perf bots. Review URL: https://chromiumcodereview.appspot.com/10872032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152963 0039d316-1c4b-4281-b951-d872f2087c98
* Replace HistoryQuickProvider protobuf-based caching with an SQLite-based ↵mrossetti@chromium.org2012-08-231-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | database. The protobuf-based cache was only being read at startup and written at shutdown. (Except that when the cache could not be read at startup the cache would immediately be saved upon private data reconstruction from the History database.) With the new implementation using an SQLite database for the HQP cache the private data will be restored from the cache database at startup and continually updated during normal operation. There is no need to flush or write the cache at shutdown as it is constantly kept up-to-date. Detailed comments about the changes made in this CL can be found in the document shared separately. Previous reviewers: sky, pkasting, shess. BUG=95686, 95876, 131668 TEST=New tests added, old tests updated, all tests pass. To manually verify changes: NOTE: For tests using chrome://omnibox be sure to check the "Show results per provider" and then look at the results for the HistoryQuickProvider. 1) New visits: Type an URL never visited before. Bring up new tab. Start typing the URL or parts of the page title or both and verify that the page is offered as a suggestion. 2) New visits: Type an URL never visited before. Do search using chrome://omnibox. New visit should show. 3) Delete visit: Visit some pages and verify they have been recorded. Bring up history and delete one of the visits. Check via chrome://omnibox that it was deleted. 4) Clear history: Visit some pages. Clear the visit history. Check via chrome://omnibox that none of the visits are still returned by the HQP. 5) Updated site: Create a local page and visit it. Search using chrome://omnibox by page title and verify it can be found. Change the page title dramatically and revisit the page. Verify via chrome://oomnibox that the page can be found by words from the new title. Previously reviewed as: http://codereview.chromium.org/10477018/. 10477018 was reverted due to memory leaks detected by build bots. Review URL: https://chromiumcodereview.appspot.com/10837244 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152946 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 151419 - Replace HistoryQuickProvider protobuf-based caching with an ↵mrossetti@chromium.org2012-08-141-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | SQLite-based database. The protobuf-based cache was only being read at startup and written at shutdown. (Except that when the cache could not be read at startup the cache would immediately be saved upon private data reconstruction from the History database.) With the new implementation using an SQLite database for the HQP cache the private data will be restored from the cache database at startup and continually updated during normal operation. There is no need to flush or write the cache at shutdown as it is constantly kept up-to-date. Detailed comments about the changes made in this CL can be found in the document shared separately. Reviewer suggestions: sky: for proper thread usage. Also chrome/browser/ui/ and chrome/browser/visitedlink/. pkasting: for whatever you'd like to check over but please look over the design document shared separately. shess: please take a look at database usage in chrome/browser/history/in_memory_url_cache_database.h/.cc. BUG=95686,95876,131668 TEST=New tests added, old tests updated, all tests pass. To manually verify changes: NOTE: For tests using chrome://omnibox be sure to check the "Show results per provider" and then look at the results for the HistoryQuickProvider. 1) New visits: Type an URL never visited before. Bring up new tab. Start typing the URL or parts of the page title or both and verify that the page is offered as a suggestion. 2) New visits: Type an URL never visited before. Do search using chrome://omnibox. New visit should show. 3) Delete visit: Visit some pages and verify they have been recorded. Bring up history and delete one of the visits. Check via chrome://omnibox that it was deleted. 4) Clear history: Visit some pages. Clear the visit history. Check via chrome://omnibox that none of the visits are still returned by the HQP. 5) Updated site: Create a local page and visit it. Search using chrome://omnibox by page title and verify it can be found. Change the page title dramatically and revisit the page. Verify via chrome://oomnibox that the page can be found by words from the new title. Review URL: https://chromiumcodereview.appspot.com/10477018 TBR=mrossetti@chromium.org Review URL: https://chromiumcodereview.appspot.com/10830297 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151424 0039d316-1c4b-4281-b951-d872f2087c98
* Replace HistoryQuickProvider protobuf-based caching with an SQLite-based ↵mrossetti@chromium.org2012-08-141-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | database. The protobuf-based cache was only being read at startup and written at shutdown. (Except that when the cache could not be read at startup the cache would immediately be saved upon private data reconstruction from the History database.) With the new implementation using an SQLite database for the HQP cache the private data will be restored from the cache database at startup and continually updated during normal operation. There is no need to flush or write the cache at shutdown as it is constantly kept up-to-date. Detailed comments about the changes made in this CL can be found in the document shared separately. Reviewer suggestions: sky: for proper thread usage. Also chrome/browser/ui/ and chrome/browser/visitedlink/. pkasting: for whatever you'd like to check over but please look over the design document shared separately. shess: please take a look at database usage in chrome/browser/history/in_memory_url_cache_database.h/.cc. BUG=95686,95876,131668 TEST=New tests added, old tests updated, all tests pass. To manually verify changes: NOTE: For tests using chrome://omnibox be sure to check the "Show results per provider" and then look at the results for the HistoryQuickProvider. 1) New visits: Type an URL never visited before. Bring up new tab. Start typing the URL or parts of the page title or both and verify that the page is offered as a suggestion. 2) New visits: Type an URL never visited before. Do search using chrome://omnibox. New visit should show. 3) Delete visit: Visit some pages and verify they have been recorded. Bring up history and delete one of the visits. Check via chrome://omnibox that it was deleted. 4) Clear history: Visit some pages. Clear the visit history. Check via chrome://omnibox that none of the visits are still returned by the HQP. 5) Updated site: Create a local page and visit it. Search using chrome://omnibox by page title and verify it can be found. Change the page title dramatically and revisit the page. Verify via chrome://oomnibox that the page can be found by words from the new title. Review URL: https://chromiumcodereview.appspot.com/10477018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151419 0039d316-1c4b-4281-b951-d872f2087c98
* Make java.gypi export jar path to input_jars_paths variablecjhopman@chromium.org2012-08-091-1/+0
| | | | | | | | | | | | | | | | | Both java.gypi and apk_test.gypi expect the jar path in input_jars_paths. This means that we were specifying the dependence in both 'dependencies' and 'input_jars_paths'. This change makes it so that we don't need that redundancy. Also, make java.gypi use input_jars_paths in its input so that we actually rebuild targets when we should. BUG=136756 Review URL: https://chromiumcodereview.appspot.com/10837143 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150850 0039d316-1c4b-4281-b951-d872f2087c98
* Upstream sqlite gyp changes for Android.yfriedman@chromium.org2012-08-062-8/+42
| | | | | | | | | | | Includes a change to sql/Connection to propagate the auto_vacuum pragma across a raze operation. Also updates test expectations. BUG=137853 Review URL: https://chromiumcodereview.appspot.com/10829062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150128 0039d316-1c4b-4281-b951-d872f2087c98
* Annotate calls to SQLite functions - they have to be executed on a thread ↵shess@chromium.org2012-07-273-1/+48
| | | | | | | | | | | | | | | | | | | | | | | allowing IO access. Also expanded scope of ScopedAllowIO in SQLiteServerBoundCertStore::Backend::Load() to cover SQLite functions. And added ScopedAllowIO to PasswordStoreFactory::BuildServiceInstanceFor() -- it calls LoginDatabase::Init() which should be executed on DB thread. This is a reland of https://src.chromium.org/viewvc/chrome?view=rev&revision=147309 which was reverted because of missing ScopedAllowIO in PasswordStoreFactory. Patch from Pavel Ivanov <paivanof@gmail.com> BUG=75232, 52909, 137961, 138903 TEST=no test fails with message "Function marked as IO-only was called from a thread that disallows IO!" Review URL: https://chromiumcodereview.appspot.com/10824008 Patch from Pavel Ivanov <paivanof@gmail.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148788 0039d316-1c4b-4281-b951-d872f2087c98
* GYP changes to get sql and sqlite building on iOS.rohitrao@chromium.org2012-07-241-1/+1
| | | | | | | | | | BUG=None TEST=None Review URL: https://chromiumcodereview.appspot.com/10696219 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148136 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the sqlite errors of content unittests on Androidyongsheng.zhu@intel.com2012-07-241-0/+14
| | | | | | | | | | | | | | | | | | | | | Many tests are failed due to sqlite errors on Android. The reason is that sqlite need a temporary directory to store internal temporary files. However, Android doesn't have this kind of directory while Linux has /var/tmp. To fix this, use in-memory temporary files. It also includes: 1) Add one unit test in sql unittests to reproduce this issue for Android. 2) Remove those disabled cases for content unitests on Android. BUG= TEST=run_tests.py -s sql_unittests; run_test.py -s net_unittests Review URL: https://chromiumcodereview.appspot.com/10809015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148064 0039d316-1c4b-4281-b951-d872f2087c98
* [sql] Refactor to remove use of const_cast<>.shess@chromium.org2012-07-242-12/+35
| | | | | | | | | | | | | | | The comments in these cases used incorrect reasoning for why the const_cast<> was safe. Whether the SQL statements modify the database is irrelevant. Add an internal helper to allow them to correctly accomplish things in a const situation. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10736042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148031 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 147309 - Annotate calls to SQLite functions - they have to be ↵shess@chromium.org2012-07-183-49/+2
| | | | | | | | | | | | | | | | | | | executed on a thread allowing IO access. Expand scope of ScopedAllowIO in the only place where SQLite functions are used on UI thread. Patch from Pavel Ivanov <paivanof@gmail.com> BUG=75232,52909,137961 TEST=no test fails with message "Function marked as IO-only was called from a thread that disallows IO!" Review URL: https://chromiumcodereview.appspot.com/10540155 Patch from Pavel Ivanov <paivanof@gmail.com>. TBR=shess@chromium.org Review URL: https://chromiumcodereview.appspot.com/10806025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147340 0039d316-1c4b-4281-b951-d872f2087c98
* Annotate calls to SQLite functions - they have to be executed on a thread ↵shess@chromium.org2012-07-183-2/+49
| | | | | | | | | | | | | | | | allowing IO access. Expand scope of ScopedAllowIO in the only place where SQLite functions are used on UI thread. Patch from Pavel Ivanov <paivanof@gmail.com> BUG=75232,52909 TEST=no test fails with message "Function marked as IO-only was called from a thread that disallows IO!" Review URL: https://chromiumcodereview.appspot.com/10540155 Patch from Pavel Ivanov <paivanof@gmail.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147309 0039d316-1c4b-4281-b951-d872f2087c98
* Modify sql unittests to pass on iOS.rohitrao@chromium.org2012-07-133-7/+13
| | | | | | | | | | BUG=None TEST=None Review URL: https://chromiumcodereview.appspot.com/10702203 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146604 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-117-7/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* Avoid leaking any files from SQLiteFeaturesTest.paivanof@gmail.com2012-06-131-10/+5
| | | | | | | | | | | Patch from Pavel Ivanov <paivanof@gmail.com> BUG=130498 TEST=On Linux /tmp/SQLStatementTest.db-journal is not left after execution. Review URL: https://chromiumcodereview.appspot.com/10542096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141849 0039d316-1c4b-4281-b951-d872f2087c98
* Add APK targets for sql_unittests and sync_unit_tests.nileshagrawal@chromium.org2012-05-311-2/+29
| | | | | | | | | | | | | BUG=125059 Follow-up to: http://codereview.chromium.org/10399126/ TEST= Review URL: https://chromiumcodereview.appspot.com/10443068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139727 0039d316-1c4b-4281-b951-d872f2087c98