| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the tests manually changes the current schema to look like
an old schema, then targetted specific implementation functions.
Change to instead create the schema from a golden file, testing that
Init() works correctly, and the expected data is in place.
BUG=none
R=pkotwicz@chromium.org, sky@chromium.org
Review URL: https://codereview.chromium.org/23536014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222400 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=273203
Review URL: https://chromiumcodereview.appspot.com/23649002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221922 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note that the new code is still behind a runtime flag
(--brave-new-test-launcher), but compiling tests with support for it
will make further testing possible.
BUG=236893, 79359
R=akalin@chromium.org, enne@chromium.org, erikwright@chromium.org, joi@chromium.org, keybuk@chromium.org, sky@chromium.org, thestig@chromium.org, tommi@chromium.org, wtc@chromium.org, xhwang@chromium.org, yzshen@chromium.org
Review URL: https://codereview.chromium.org/23442019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221464 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, ThumbnailDatabase exposed much internals knowledge. Push
most of that down into the class and remove the schema hacks which are
no longer necessary.
BUG=272519
TEST=Unit tests.
Review URL: https://chromiumcodereview.appspot.com/22898003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217993 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Load the recover virtual table as part of sql::Recovery::Begin(), and
implement basic unit tests that it correctly recovers valid and
corrupt tables.
BUG=109482
Review URL: https://chromiumcodereview.appspot.com/20022006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215764 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Cleanup open-time histograms to use the sparse framework so that
extended histograms can be recorded - also add entries to the xml
file.
Add a histogram to track close-time failures. This should never fail,
but if it is it probably leaks memory and file handles, and possibly
locks.
BUG=none
Review URL: https://chromiumcodereview.appspot.com/18978012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213345 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
sqlite3_initialize() uses double-check locking, and is thus prone to
data races.
BUG=248101
Review URL: https://chromiumcodereview.appspot.com/19000007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212984 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sql::Recovery is intended to be used within a sql::Connection error
callback to either recover the database (*) or indicate that the
database is unrecoverable and should be razed. The intend is that the
code should either progress to a valid database which is composed of
data recovered from the original (likely corrupt) database, or a valid
database which is empty.
This is just the framework without the SQLite-level data-recovery
virtual table.
BUG=109482
Review URL: https://chromiumcodereview.appspot.com/19281002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212607 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
This will allow SQLite database to reduce their page cache memory on systems
which provide a MemoryPressureListener signal.
BUG=243769
Review URL: https://chromiumcodereview.appspot.com/17071007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212374 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By default POSIX umask is generally 0644. For some databases, it
makes sense to restrict access to 0600.
Use new setting for password database.
BUG=258771
R=gbillock@chromium.org, isherman@chromium.org, jorgelo@chromium.org
Review URL: https://codereview.chromium.org/5125579611308032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212106 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the caller cannot have existing database-derived state before
the database is opened, Open() can be safely retried after the error
handler has razed the database.
BUG=109482
Review URL: https://chromiumcodereview.appspot.com/18641004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211936 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Also renames DeleteAfterReboot to DeleteFileAfterReboot, and removes FileUtilProxy::RecursiveDelete which was never called.
BUG=
R=shess@chromium.org
Review URL: https://codereview.chromium.org/18584011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211822 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test error callback and ScopedErrorIgnorer for running statements.
Share error-callback test code between statement and connection tests.
Test additional error-callback edge cases.
Also fix callback use-after-free case.
BUG=254584
Review URL: https://chromiumcodereview.appspot.com/17726002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211281 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=
TBR=jam@chromium.org
Review URL: https://codereview.chromium.org/18286004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211147 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Verify that Raze() can handle:
- empty databases.
- non-database files.
- databases overwritten with garbage.
- databases which cannot be opened successfully.
BUG=none
Review URL: https://chromiumcodereview.appspot.com/17752002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210923 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Chrome for iOS uses system SQLite, which on iOS doesn't include the ICU
extensions, which includes the now-required-by-Chrome REGEXP support.
This compiles that extension as a static library, and dynamically
registers it on each database opened.
BUG=254636
Review URL: https://chromiumcodereview.appspot.com/18312005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210572 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=
Review URL: https://codereview.chromium.org/16950028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209475 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=254986
TEST=none
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/18031009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209152 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Not all of the ad-hoc file_util::Delete() cases handle -journal, and
if -wal was added all of them need to be tracked down.
BUG=none
Review URL: https://chromiumcodereview.appspot.com/17058004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208140 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sql/ throws FATAL whenever it sees inappropriate calls, which makes
production code to handle errors hard to test. ScopedErrorIgnorer
provides a way for tests to signal that specific errors are expected
and will be handled.
As a first pass, code up some additional tests for some Raze() edge
cases, and modify things to pass those tests.
BUG=159490
Review URL: https://chromiumcodereview.appspot.com/16664005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207096 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
API cleanup. Replaced by ErrorCallback.
BUG=none
Review URL: https://chromiumcodereview.appspot.com/16788002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206299 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> 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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
TBR=sky
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184344 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|