| Index: components/history/core/browser/thumbnail_database.cc
|
| diff --git a/components/history/core/browser/thumbnail_database.cc b/components/history/core/browser/thumbnail_database.cc
|
| index 35afa12319fc9a021b6c7c3d7dfd30971e35cf5f..e9226b2c7f4cc313028b6ce1bef1e73d8db95424 100644
|
| --- a/components/history/core/browser/thumbnail_database.cc
|
| +++ b/components/history/core/browser/thumbnail_database.cc
|
| @@ -256,14 +256,14 @@ void GenerateDiagnostics(sql::Connection* db,
|
|
|
| // Corrupt cases currently dominate, report them very infrequently.
|
| static const uint64 kCorruptReportsPerMillion = 10000;
|
| - if (rand < kCorruptReportsPerMillion)
|
| + if (rand < kCorruptReportsPerMillion && db->RegisterIntentToUpload())
|
| ReportCorrupt(db, startup_kb);
|
| } else if (error == SQLITE_READONLY) {
|
| // SQLITE_READONLY appears similar to SQLITE_CORRUPT - once it
|
| // is seen, it is almost guaranteed to be seen again.
|
| reported = true;
|
|
|
| - if (rand < kReportsPerMillion)
|
| + if (rand < kReportsPerMillion && db->RegisterIntentToUpload())
|
| ReportError(db, extended_error);
|
| } else {
|
| // Only set the flag when making a report. This should allow
|
| @@ -276,7 +276,8 @@ void GenerateDiagnostics(sql::Connection* db,
|
| // channels, so probably easier to just harvest from the field.
|
| if (rand < kReportsPerMillion) {
|
| reported = true;
|
| - ReportError(db, extended_error);
|
| + if (db->RegisterIntentToUpload())
|
| + ReportError(db, extended_error);
|
| }
|
| }
|
| }
|
|
|