| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_EXTENSION_WELCOME_NOTIFICATION_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_EXTENSION_WELCOME_NOTIFICATION_H_ |
| 6 #define CHROME_BROWSER_NOTIFICATIONS_EXTENSION_WELCOME_NOTIFICATION_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_EXTENSION_WELCOME_NOTIFICATION_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 | 145 |
| 146 // If the preferences are still syncing, store the last notification here | 146 // If the preferences are still syncing, store the last notification here |
| 147 // so we can replay ShowWelcomeNotificationIfNecessary once the sync finishes. | 147 // so we can replay ShowWelcomeNotificationIfNecessary once the sync finishes. |
| 148 // Simplifying Assumption: The delayed notification has passed the | 148 // Simplifying Assumption: The delayed notification has passed the |
| 149 // extension ID check. This means we do not need to store all of the | 149 // extension ID check. This means we do not need to store all of the |
| 150 // notifications that may also show a welcome notification. | 150 // notifications that may also show a welcome notification. |
| 151 scoped_ptr<Notification> delayed_notification_; | 151 scoped_ptr<Notification> delayed_notification_; |
| 152 | 152 |
| 153 // If the welcome notification is shown, this timer tracks when to hide the | 153 // If the welcome notification is shown, this timer tracks when to hide the |
| 154 // welcome notification. | 154 // welcome notification. |
| 155 scoped_ptr<base::OneShotTimer<ExtensionWelcomeNotification> > | 155 scoped_ptr<base::OneShotTimer> expiration_timer_; |
| 156 expiration_timer_; | |
| 157 | 156 |
| 158 // Delegate for Chrome global calls like base::Time::GetTime() for | 157 // Delegate for Chrome global calls like base::Time::GetTime() for |
| 159 // testability. | 158 // testability. |
| 160 scoped_ptr<Delegate> delegate_; | 159 scoped_ptr<Delegate> delegate_; |
| 161 | 160 |
| 162 DISALLOW_COPY_AND_ASSIGN(ExtensionWelcomeNotification); | 161 DISALLOW_COPY_AND_ASSIGN(ExtensionWelcomeNotification); |
| 163 }; | 162 }; |
| 164 | 163 |
| 165 #endif // CHROME_BROWSER_NOTIFICATIONS_EXTENSION_WELCOME_NOTIFICATION_H_ | 164 #endif // CHROME_BROWSER_NOTIFICATIONS_EXTENSION_WELCOME_NOTIFICATION_H_ |
| OLD | NEW |