Commit f07c8d32 authored by Sajjad Mirza's avatar Sajjad Mirza Committed by Commit Bot

Explicitly set undefined virtual functions to = 0.

When compiling with coverage flags enabled, this class caused a missing
key function error at link-time.
[https://lld.llvm.org/missingkeyfunction]

The fix is to ensure that all non-pure, non-inline, virtual functions
are properly defined somewhere. Given the way this class is used, the
most appropriate response appears to be marking its member functions
as pure virtual.

Bug: 1049383
Change-Id: I2f4c063bb151ac409f41f12c6da6e7f71c0d2a4f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2040680
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#739170}
parent dcf43b4f
...@@ -19,28 +19,28 @@ class UpdateNotificationServiceBridge { ...@@ -19,28 +19,28 @@ class UpdateNotificationServiceBridge {
static std::unique_ptr<UpdateNotificationServiceBridge> Create(); static std::unique_ptr<UpdateNotificationServiceBridge> Create();
// Updates and persists |timestamp| in Android SharedPreferences. // Updates and persists |timestamp| in Android SharedPreferences.
virtual void UpdateLastShownTimeStamp(base::Time timestamp); virtual void UpdateLastShownTimeStamp(base::Time timestamp) = 0;
// Returns persisted timestamp of last shown notification from Android // Returns persisted timestamp of last shown notification from Android
// SharedPreferences. Return nullopt if there is no data. // SharedPreferences. Return nullopt if there is no data.
virtual base::Optional<base::Time> GetLastShownTimeStamp(); virtual base::Optional<base::Time> GetLastShownTimeStamp() = 0;
// Updates and persists |interval| in Android SharedPreferences. // Updates and persists |interval| in Android SharedPreferences.
virtual void UpdateThrottleInterval(base::TimeDelta interval); virtual void UpdateThrottleInterval(base::TimeDelta interval) = 0;
// Returns persisted interval that might be throttled from Android // Returns persisted interval that might be throttled from Android
// SharedPreferences. Return nullopt if there is no data. // SharedPreferences. Return nullopt if there is no data.
virtual base::Optional<base::TimeDelta> GetThrottleInterval(); virtual base::Optional<base::TimeDelta> GetThrottleInterval() = 0;
// Updates and persists |count| in Android SharedPreferences. // Updates and persists |count| in Android SharedPreferences.
virtual void UpdateUserDismissCount(int count); virtual void UpdateUserDismissCount(int count) = 0;
// Returns persisted count from Android SharedPreferences. // Returns persisted count from Android SharedPreferences.
virtual int GetUserDismissCount(); virtual int GetUserDismissCount() = 0;
// Launches Chrome activity after user clicked the notification. Launching // Launches Chrome activity after user clicked the notification. Launching
// behavior may be different which depends on |state|. // behavior may be different which depends on |state|.
virtual void LaunchChromeActivity(int state); virtual void LaunchChromeActivity(int state) = 0;
virtual ~UpdateNotificationServiceBridge() = default; virtual ~UpdateNotificationServiceBridge() = default;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment