summaryrefslogtreecommitdiff
path: root/chromium/components/offline_pages
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2022-05-17 17:24:03 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-06-22 07:51:41 +0000
commit774f54339e5db91f785733232d3950366db65d07 (patch)
tree068e1b47bd1af94d77094ed12b604a6b83d9c22a /chromium/components/offline_pages
parentf7eaed5286974984ba5f9e3189d8f49d03e99f81 (diff)
downloadqtwebengine-chromium-774f54339e5db91f785733232d3950366db65d07.tar.gz
BASELINE: Update Chromium to 102.0.5005.57
Change-Id: I885f714bb40ee724c28f94ca6bd8dbdb39915158 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/components/offline_pages')
-rw-r--r--chromium/components/offline_pages/core/background/pick_request_task.h1
-rw-r--r--chromium/components/offline_pages/core/background/request_coordinator.cc2
-rw-r--r--chromium/components/offline_pages/core/background/request_queue_store_unittest.cc8
-rw-r--r--chromium/components/offline_pages/core/model/cleanup_visuals_task.h3
-rw-r--r--chromium/components/offline_pages/core/model/clear_storage_task.h1
-rw-r--r--chromium/components/offline_pages/core/model/offline_page_item_generator.h1
-rw-r--r--chromium/components/offline_pages/core/model/offline_page_model_taskified.cc2
-rw-r--r--chromium/components/offline_pages/core/model/persistent_page_consistency_check_task.h1
-rw-r--r--chromium/components/offline_pages/core/model/store_visuals_task.h1
-rw-r--r--chromium/components/offline_pages/core/prefetch/prefetch_dispatcher_impl.cc1
-rw-r--r--chromium/components/offline_pages/core/prefetch/prefetch_prefs.cc1
-rw-r--r--chromium/components/offline_pages/core/prefetch/prefetch_prefs_unittest.cc1
-rw-r--r--chromium/components/offline_pages/core/prefetch/store/prefetch_store_test_util.cc21
-rw-r--r--chromium/components/offline_pages/core/prefetch/store/prefetch_store_test_util.h2
-rw-r--r--chromium/components/offline_pages/core/prefetch/test_download_service.cc1
-rw-r--r--chromium/components/offline_pages/task/sql_store_base.cc1
-rw-r--r--chromium/components/offline_pages/task/sql_store_base.h1
17 files changed, 27 insertions, 22 deletions
diff --git a/chromium/components/offline_pages/core/background/pick_request_task.h b/chromium/components/offline_pages/core/background/pick_request_task.h
index 16c92bb1a8a..95e0556a63b 100644
--- a/chromium/components/offline_pages/core/background/pick_request_task.h
+++ b/chromium/components/offline_pages/core/background/pick_request_task.h
@@ -12,6 +12,7 @@
#include "base/containers/circular_deque.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "base/time/time.h"
#include "components/offline_pages/core/background/device_conditions.h"
#include "components/offline_pages/core/background/request_queue_results.h"
#include "components/offline_pages/core/background/save_page_request.h"
diff --git a/chromium/components/offline_pages/core/background/request_coordinator.cc b/chromium/components/offline_pages/core/background/request_coordinator.cc
index 5d4d584ef83..4cc5cc96954 100644
--- a/chromium/components/offline_pages/core/background/request_coordinator.cc
+++ b/chromium/components/offline_pages/core/background/request_coordinator.cc
@@ -14,8 +14,10 @@
#include "base/logging.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
+#include "base/observer_list.h"
#include "base/rand_util.h"
#include "base/system/sys_info.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "components/offline_pages/core/background/offliner.h"
#include "components/offline_pages/core/background/offliner_client.h"
diff --git a/chromium/components/offline_pages/core/background/request_queue_store_unittest.cc b/chromium/components/offline_pages/core/background/request_queue_store_unittest.cc
index 9e5d22055d3..abed52c7b0f 100644
--- a/chromium/components/offline_pages/core/background/request_queue_store_unittest.cc
+++ b/chromium/components/offline_pages/core/background/request_queue_store_unittest.cc
@@ -68,7 +68,6 @@ void BuildTestStoreWithSchemaFromM57(const base::FilePath& file,
ASSERT_TRUE(
connection.Open(file.Append(FILE_PATH_LITERAL("RequestQueue.db"))));
ASSERT_TRUE(connection.is_open());
- ASSERT_TRUE(connection.BeginTransaction());
ASSERT_TRUE(
connection.Execute("CREATE TABLE " REQUEST_QUEUE_TABLE_NAME
" (request_id INTEGER PRIMARY KEY NOT NULL,"
@@ -83,7 +82,6 @@ void BuildTestStoreWithSchemaFromM57(const base::FilePath& file,
" client_id VARCHAR NOT NULL"
")"));
- ASSERT_TRUE(connection.CommitTransaction());
sql::Statement statement(connection.GetUniqueStatement(
"INSERT OR IGNORE INTO " REQUEST_QUEUE_TABLE_NAME
" (request_id, creation_time, activation_time,"
@@ -115,7 +113,6 @@ void BuildTestStoreWithSchemaFromM58(const base::FilePath& file,
ASSERT_TRUE(
connection.Open(file.Append(FILE_PATH_LITERAL("RequestQueue.db"))));
ASSERT_TRUE(connection.is_open());
- ASSERT_TRUE(connection.BeginTransaction());
ASSERT_TRUE(
connection.Execute("CREATE TABLE " REQUEST_QUEUE_TABLE_NAME
" (request_id INTEGER PRIMARY KEY NOT NULL,"
@@ -131,7 +128,6 @@ void BuildTestStoreWithSchemaFromM58(const base::FilePath& file,
" original_url VARCHAR NOT NULL"
")"));
- ASSERT_TRUE(connection.CommitTransaction());
sql::Statement statement(connection.GetUniqueStatement(
"INSERT OR IGNORE INTO " REQUEST_QUEUE_TABLE_NAME
" (request_id, creation_time, activation_time,"
@@ -164,7 +160,6 @@ void BuildTestStoreWithSchemaFromM61(const base::FilePath& file,
ASSERT_TRUE(
connection.Open(file.Append(FILE_PATH_LITERAL("RequestQueue.db"))));
ASSERT_TRUE(connection.is_open());
- ASSERT_TRUE(connection.BeginTransaction());
ASSERT_TRUE(
connection.Execute("CREATE TABLE " REQUEST_QUEUE_TABLE_NAME
" (request_id INTEGER PRIMARY KEY NOT NULL,"
@@ -181,7 +176,6 @@ void BuildTestStoreWithSchemaFromM61(const base::FilePath& file,
" request_origin VARCHAR NOT NULL DEFAULT ''"
")"));
- ASSERT_TRUE(connection.CommitTransaction());
sql::Statement statement(connection.GetUniqueStatement(
"INSERT OR IGNORE INTO " REQUEST_QUEUE_TABLE_NAME
" (request_id, creation_time, activation_time,"
@@ -215,7 +209,6 @@ void BuildTestStoreWithSchemaFromM72(const base::FilePath& file,
ASSERT_TRUE(
connection.Open(file.Append(FILE_PATH_LITERAL("RequestQueue.db"))));
ASSERT_TRUE(connection.is_open());
- ASSERT_TRUE(connection.BeginTransaction());
ASSERT_TRUE(
connection.Execute("CREATE TABLE " REQUEST_QUEUE_TABLE_NAME
" (request_id INTEGER PRIMARY KEY NOT NULL,"
@@ -233,7 +226,6 @@ void BuildTestStoreWithSchemaFromM72(const base::FilePath& file,
" fail_state INTEGER NOT NULL DEFAULT 0"
")"));
- ASSERT_TRUE(connection.CommitTransaction());
sql::Statement statement(connection.GetUniqueStatement(
"INSERT OR IGNORE INTO " REQUEST_QUEUE_TABLE_NAME
" (request_id, creation_time, activation_time,"
diff --git a/chromium/components/offline_pages/core/model/cleanup_visuals_task.h b/chromium/components/offline_pages/core/model/cleanup_visuals_task.h
index 6458c5ad0b4..aaec861b70b 100644
--- a/chromium/components/offline_pages/core/model/cleanup_visuals_task.h
+++ b/chromium/components/offline_pages/core/model/cleanup_visuals_task.h
@@ -7,6 +7,7 @@
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "base/time/time.h"
#include "components/offline_pages/core/offline_page_types.h"
#include "components/offline_pages/core/offline_page_visuals.h"
#include "components/offline_pages/task/task.h"
@@ -20,7 +21,7 @@ class CleanupVisualsTask : public Task {
public:
struct Result {
bool success = false;
- int removed_rows = 0;
+ int64_t removed_rows = 0;
};
CleanupVisualsTask(OfflinePageMetadataStore* store,
diff --git a/chromium/components/offline_pages/core/model/clear_storage_task.h b/chromium/components/offline_pages/core/model/clear_storage_task.h
index 0ac848ed2fb..8e6dfa57938 100644
--- a/chromium/components/offline_pages/core/model/clear_storage_task.h
+++ b/chromium/components/offline_pages/core/model/clear_storage_task.h
@@ -9,6 +9,7 @@
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "base/time/time.h"
#include "components/offline_pages/core/archive_manager.h"
#include "components/offline_pages/core/offline_page_types.h"
#include "components/offline_pages/task/task.h"
diff --git a/chromium/components/offline_pages/core/model/offline_page_item_generator.h b/chromium/components/offline_pages/core/model/offline_page_item_generator.h
index c07e62a6838..1d2d4c13011 100644
--- a/chromium/components/offline_pages/core/model/offline_page_item_generator.h
+++ b/chromium/components/offline_pages/core/model/offline_page_item_generator.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/time/time.h"
#include "components/offline_pages/core/client_namespace_constants.h"
#include "components/offline_pages/core/offline_page_archive_publisher.h"
#include "components/offline_pages/core/offline_page_item.h"
diff --git a/chromium/components/offline_pages/core/model/offline_page_model_taskified.cc b/chromium/components/offline_pages/core/model/offline_page_model_taskified.cc
index 81aa169a689..db2bdd845ee 100644
--- a/chromium/components/offline_pages/core/model/offline_page_model_taskified.cc
+++ b/chromium/components/offline_pages/core/model/offline_page_model_taskified.cc
@@ -14,7 +14,7 @@
#include "base/logging.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
-#include "base/task/post_task.h"
+#include "base/observer_list.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "components/offline_pages/core/archive_manager.h"
diff --git a/chromium/components/offline_pages/core/model/persistent_page_consistency_check_task.h b/chromium/components/offline_pages/core/model/persistent_page_consistency_check_task.h
index 748dcde4ff6..54bc5b484e4 100644
--- a/chromium/components/offline_pages/core/model/persistent_page_consistency_check_task.h
+++ b/chromium/components/offline_pages/core/model/persistent_page_consistency_check_task.h
@@ -9,6 +9,7 @@
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "base/time/time.h"
#include "components/offline_pages/core/offline_page_archive_publisher.h"
#include "components/offline_pages/core/offline_store_types.h"
#include "components/offline_pages/task/task.h"
diff --git a/chromium/components/offline_pages/core/model/store_visuals_task.h b/chromium/components/offline_pages/core/model/store_visuals_task.h
index 404d7a501f0..b58ed44a791 100644
--- a/chromium/components/offline_pages/core/model/store_visuals_task.h
+++ b/chromium/components/offline_pages/core/model/store_visuals_task.h
@@ -7,6 +7,7 @@
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "base/time/time.h"
#include "components/offline_pages/core/offline_page_visuals.h"
#include "components/offline_pages/task/task.h"
diff --git a/chromium/components/offline_pages/core/prefetch/prefetch_dispatcher_impl.cc b/chromium/components/offline_pages/core/prefetch/prefetch_dispatcher_impl.cc
index 2988cfdaf89..1bee6ae1f85 100644
--- a/chromium/components/offline_pages/core/prefetch/prefetch_dispatcher_impl.cc
+++ b/chromium/components/offline_pages/core/prefetch/prefetch_dispatcher_impl.cc
@@ -11,7 +11,6 @@
#include "base/callback_helpers.h"
#include "base/guid.h"
#include "base/strings/utf_string_conversions.h"
-#include "base/task/post_task.h"
#include "base/task/task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "components/offline_pages/core/client_namespace_constants.h"
diff --git a/chromium/components/offline_pages/core/prefetch/prefetch_prefs.cc b/chromium/components/offline_pages/core/prefetch/prefetch_prefs.cc
index 218d90564a6..387bf624c55 100644
--- a/chromium/components/offline_pages/core/prefetch/prefetch_prefs.cc
+++ b/chromium/components/offline_pages/core/prefetch/prefetch_prefs.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "components/offline_pages/core/prefetch/prefetch_prefs.h"
+#include "base/time/time.h"
#include "components/offline_pages/core/offline_clock.h"
#include "components/offline_pages/core/offline_page_feature.h"
#include "components/prefs/pref_registry_simple.h"
diff --git a/chromium/components/offline_pages/core/prefetch/prefetch_prefs_unittest.cc b/chromium/components/offline_pages/core/prefetch/prefetch_prefs_unittest.cc
index fed41d251de..3b3a2ae1a4a 100644
--- a/chromium/components/offline_pages/core/prefetch/prefetch_prefs_unittest.cc
+++ b/chromium/components/offline_pages/core/prefetch/prefetch_prefs_unittest.cc
@@ -4,6 +4,7 @@
#include "components/offline_pages/core/prefetch/prefetch_prefs.h"
#include "base/test/scoped_feature_list.h"
+#include "base/time/time.h"
#include "components/offline_pages/buildflags/buildflags.h"
#include "components/offline_pages/core/offline_clock.h"
#include "components/offline_pages/core/offline_page_feature.h"
diff --git a/chromium/components/offline_pages/core/prefetch/store/prefetch_store_test_util.cc b/chromium/components/offline_pages/core/prefetch/store/prefetch_store_test_util.cc
index 7883830c3f5..9665a7f9cf1 100644
--- a/chromium/components/offline_pages/core/prefetch/store/prefetch_store_test_util.cc
+++ b/chromium/components/offline_pages/core/prefetch/store/prefetch_store_test_util.cc
@@ -330,17 +330,18 @@ int PrefetchStoreTestUtil::ZombifyPrefetchItems(const std::string& name_space,
return count;
}
-int PrefetchStoreTestUtil::LastCommandChangeCount() {
+int64_t PrefetchStoreTestUtil::LastCommandChangeCount() {
base::RunLoop run_loop;
- int count = 0;
- store_->Execute(base::BindOnce([](sql::Database* connection) {
- return connection->GetLastChangeCount();
- }),
- base::BindOnce(base::BindLambdaForTesting([&](int result) {
- count = result;
- run_loop.Quit();
- })),
- 0);
+ int64_t count = 0;
+ store_->Execute(
+ base::BindOnce([](sql::Database* connection) {
+ return connection->GetLastChangeCount();
+ }),
+ base::BindOnce(base::BindLambdaForTesting([&](int64_t result) {
+ count = result;
+ run_loop.Quit();
+ })),
+ int64_t{0});
run_loop.Run();
return count;
}
diff --git a/chromium/components/offline_pages/core/prefetch/store/prefetch_store_test_util.h b/chromium/components/offline_pages/core/prefetch/store/prefetch_store_test_util.h
index ae44f548b9c..9d72209813d 100644
--- a/chromium/components/offline_pages/core/prefetch/store/prefetch_store_test_util.h
+++ b/chromium/components/offline_pages/core/prefetch/store/prefetch_store_test_util.h
@@ -72,7 +72,7 @@ class PrefetchStoreTestUtil {
int ZombifyPrefetchItems(const std::string& name_space, const GURL& url);
// Returns number of rows affected by last SQL statement.
- int LastCommandChangeCount();
+ int64_t LastCommandChangeCount();
// Gets the prefetch downloader quota value for testing.
// Quota calculation will use |clock_| as time source.
diff --git a/chromium/components/offline_pages/core/prefetch/test_download_service.cc b/chromium/components/offline_pages/core/prefetch/test_download_service.cc
index af900faaf22..6afce702120 100644
--- a/chromium/components/offline_pages/core/prefetch/test_download_service.cc
+++ b/chromium/components/offline_pages/core/prefetch/test_download_service.cc
@@ -11,6 +11,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/test/bind.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "base/time/time.h"
#include "components/download/public/background_service/download_metadata.h"
#include "components/download/public/background_service/service_config.h"
#include "components/offline_pages/core/prefetch/test_download_client.h"
diff --git a/chromium/components/offline_pages/task/sql_store_base.cc b/chromium/components/offline_pages/task/sql_store_base.cc
index f71d4e5d22d..b25bdd0eb95 100644
--- a/chromium/components/offline_pages/task/sql_store_base.cc
+++ b/chromium/components/offline_pages/task/sql_store_base.cc
@@ -11,6 +11,7 @@
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/task/sequenced_task_runner.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "base/trace_event/trace_event.h"
namespace offline_pages {
diff --git a/chromium/components/offline_pages/task/sql_store_base.h b/chromium/components/offline_pages/task/sql_store_base.h
index e496d76547f..3883984665c 100644
--- a/chromium/components/offline_pages/task/sql_store_base.h
+++ b/chromium/components/offline_pages/task/sql_store_base.h
@@ -16,6 +16,7 @@
#include "base/memory/weak_ptr.h"
#include "base/task/task_runner_util.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "base/time/time.h"
#include "sql/database.h"
namespace offline_pages {