Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2617)

Unified Diff: chrome/browser/chromeos/hats/hats_notification_controller.h

Issue 2103293003: Checks the age of device before initializing HaTS Notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Checks the age of device before initializing HaTS Notification Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/hats/hats_notification_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/hats/hats_notification_controller.h
diff --git a/chrome/browser/chromeos/hats/hats_notification_controller.h b/chrome/browser/chromeos/hats/hats_notification_controller.h
index 95b75d66f47de3bb349ee554ce9468d41d4d64e1..20d36a5fd14c63d871ae57744f3d286c7fd5d48c 100644
--- a/chrome/browser/chromeos/hats/hats_notification_controller.h
+++ b/chrome/browser/chromeos/hats/hats_notification_controller.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_CHROMEOS_HATS_HATS_NOTIFICATION_CONTROLLER_H_
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "chrome/browser/notifications/notification.h"
#include "chrome/browser/notifications/notification_delegate.h"
@@ -23,7 +24,10 @@ class HatsNotificationController : public NotificationDelegate,
public:
// Minimum amount of time before the notification is displayed again after a
// user has interacted with it.
- static const base::TimeDelta kHatsThresholdTime;
+ static const int kHatsThresholdDays;
+ // Minimum amount of time after initial login or oobe after which we can show
+ // the HaTS notification.
+ static const int kHatsNewDeviceThresholdDays;
static const char kDelegateId[];
static const char kNotificationId[];
@@ -36,6 +40,7 @@ class HatsNotificationController : public NotificationDelegate,
~HatsNotificationController() override;
// NotificationDelegate overrides:
+ void Initialize(bool is_new_device);
void ButtonClick(int button_index) override;
void Close(bool by_user) override;
std::string id() const override;
@@ -49,6 +54,7 @@ class HatsNotificationController : public NotificationDelegate,
void UpdateLastInteractionTime();
Profile* profile_;
+ base::WeakPtrFactory<HatsNotificationController> weak_pointer_factory_;
DISALLOW_COPY_AND_ASSIGN(HatsNotificationController);
};
« no previous file with comments | « no previous file | chrome/browser/chromeos/hats/hats_notification_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698