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

Side by Side Diff: chrome/browser/notifications/extension_welcome_notification.h

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: . Created 5 years, 3 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 unified diff | Download patch
OLDNEW
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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 144
145 // If the preferences are still syncing, store the last notification here 145 // If the preferences are still syncing, store the last notification here
146 // so we can replay ShowWelcomeNotificationIfNecessary once the sync finishes. 146 // so we can replay ShowWelcomeNotificationIfNecessary once the sync finishes.
147 // Simplifying Assumption: The delayed notification has passed the 147 // Simplifying Assumption: The delayed notification has passed the
148 // extension ID check. This means we do not need to store all of the 148 // extension ID check. This means we do not need to store all of the
149 // notifications that may also show a welcome notification. 149 // notifications that may also show a welcome notification.
150 scoped_ptr<Notification> delayed_notification_; 150 scoped_ptr<Notification> delayed_notification_;
151 151
152 // If the welcome notification is shown, this timer tracks when to hide the 152 // If the welcome notification is shown, this timer tracks when to hide the
153 // welcome notification. 153 // welcome notification.
154 scoped_ptr<base::OneShotTimer<ExtensionWelcomeNotification> > 154 scoped_ptr<base::OneShotTimer> expiration_timer_;
155 expiration_timer_;
156 155
157 // Delegate for Chrome global calls like base::Time::GetTime() for 156 // Delegate for Chrome global calls like base::Time::GetTime() for
158 // testability. 157 // testability.
159 scoped_ptr<Delegate> delegate_; 158 scoped_ptr<Delegate> delegate_;
160 159
161 DISALLOW_COPY_AND_ASSIGN(ExtensionWelcomeNotification); 160 DISALLOW_COPY_AND_ASSIGN(ExtensionWelcomeNotification);
162 }; 161 };
163 162
164 #endif // CHROME_BROWSER_NOTIFICATIONS_EXTENSION_WELCOME_NOTIFICATION_H_ 163 #endif // CHROME_BROWSER_NOTIFICATIONS_EXTENSION_WELCOME_NOTIFICATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698