summaryrefslogtreecommitdiff
path: root/chromium/components/suggestions
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-09-03 13:32:17 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-10-01 14:31:55 +0200
commit21ba0c5d4bf8fba15dddd97cd693bad2358b77fd (patch)
tree91be119f694044dfc1ff9fdc054459e925de9df0 /chromium/components/suggestions
parent03c549e0392f92c02536d3f86d5e1d8dfa3435ac (diff)
downloadqtwebengine-chromium-21ba0c5d4bf8fba15dddd97cd693bad2358b77fd.tar.gz
BASELINE: Update Chromium to 92.0.4515.166
Change-Id: I42a050486714e9e54fc271f2a8939223a02ae364
Diffstat (limited to 'chromium/components/suggestions')
-rw-r--r--chromium/components/suggestions/suggestions_service.h6
-rw-r--r--chromium/components/suggestions/suggestions_service_impl.cc4
-rw-r--r--chromium/components/suggestions/suggestions_service_impl.h4
-rw-r--r--chromium/components/suggestions/suggestions_store.h2
4 files changed, 6 insertions, 10 deletions
diff --git a/chromium/components/suggestions/suggestions_service.h b/chromium/components/suggestions/suggestions_service.h
index 3226b303541..43daf37b429 100644
--- a/chromium/components/suggestions/suggestions_service.h
+++ b/chromium/components/suggestions/suggestions_service.h
@@ -5,14 +5,12 @@
#ifndef COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_H_
#define COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_H_
-#include <memory>
-
#include "base/callback.h"
#include "base/callback_list.h"
#include "base/macros.h"
-#include "base/optional.h"
#include "components/keyed_service/core/keyed_service.h"
#include "components/suggestions/proto/suggestions.pb.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
#include "url/gurl.h"
namespace suggestions {
@@ -32,7 +30,7 @@ class SuggestionsService : public KeyedService {
virtual bool FetchSuggestionsData() = 0;
// Returns the current set of suggestions from the cache.
- virtual base::Optional<SuggestionsProfile> GetSuggestionsDataFromCache()
+ virtual absl::optional<SuggestionsProfile> GetSuggestionsDataFromCache()
const = 0;
// Adds a callback that is called when the suggestions are updated.
diff --git a/chromium/components/suggestions/suggestions_service_impl.cc b/chromium/components/suggestions/suggestions_service_impl.cc
index e141fc13e98..7dd92fe69cb 100644
--- a/chromium/components/suggestions/suggestions_service_impl.cc
+++ b/chromium/components/suggestions/suggestions_service_impl.cc
@@ -140,12 +140,12 @@ bool SuggestionsServiceImpl::FetchSuggestionsData() {
return true;
}
-base::Optional<SuggestionsProfile>
+absl::optional<SuggestionsProfile>
SuggestionsServiceImpl::GetSuggestionsDataFromCache() const {
SuggestionsProfile suggestions;
// In case of empty cache or error, return empty.
if (!suggestions_store_->LoadSuggestions(&suggestions))
- return base::nullopt;
+ return absl::nullopt;
blocklist_store_->FilterSuggestions(&suggestions);
return suggestions;
}
diff --git a/chromium/components/suggestions/suggestions_service_impl.h b/chromium/components/suggestions/suggestions_service_impl.h
index 43e70953de1..eaa210d22e1 100644
--- a/chromium/components/suggestions/suggestions_service_impl.h
+++ b/chromium/components/suggestions/suggestions_service_impl.h
@@ -15,7 +15,6 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
-#include "base/optional.h"
#include "base/scoped_observation.h"
#include "base/threading/thread_checker.h"
#include "base/time/tick_clock.h"
@@ -30,6 +29,7 @@
#include "google_apis/gaia/google_service_auth_error.h"
#include "net/base/backoff_entry.h"
#include "net/url_request/url_fetcher_delegate.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
#include "url/gurl.h"
namespace signin {
@@ -66,7 +66,7 @@ class SuggestionsServiceImpl : public SuggestionsService,
// SuggestionsService implementation.
bool FetchSuggestionsData() override;
- base::Optional<SuggestionsProfile> GetSuggestionsDataFromCache()
+ absl::optional<SuggestionsProfile> GetSuggestionsDataFromCache()
const override;
base::CallbackListSubscription AddCallback(
const ResponseCallback& callback) override WARN_UNUSED_RESULT;
diff --git a/chromium/components/suggestions/suggestions_store.h b/chromium/components/suggestions/suggestions_store.h
index 35f1095cf0f..eb25c574942 100644
--- a/chromium/components/suggestions/suggestions_store.h
+++ b/chromium/components/suggestions/suggestions_store.h
@@ -5,8 +5,6 @@
#ifndef COMPONENTS_SUGGESTIONS_SUGGESTIONS_STORE_H_
#define COMPONENTS_SUGGESTIONS_SUGGESTIONS_STORE_H_
-#include <memory>
-
#include "base/macros.h"
#include "base/time/clock.h"
#include "components/suggestions/proto/suggestions.pb.h"