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

Side by Side Diff: ui/message_center/popup_timer.h

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 UI_MESSAGE_CENTER_POPUP_TIMER_H_ 5 #ifndef UI_MESSAGE_CENTER_POPUP_TIMER_H_
6 #define UI_MESSAGE_CENTER_POPUP_TIMER_H_ 6 #define UI_MESSAGE_CENTER_POPUP_TIMER_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "base/timer/timer.h" 14 #include "base/timer/timer.h"
15 15
16 namespace message_center { 16 namespace message_center {
17 17
18 // A class that manages timeout behavior for notification popups. One instance 18 // A class that manages timeout behavior for notification popups. One instance
19 // is created per notification popup. 19 // is created per notification popup.
20 class PopupTimer { 20 class PopupTimer {
21 public: 21 public:
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // If paused, the amount of time that passed before pause. 57 // If paused, the amount of time that passed before pause.
58 base::TimeDelta passed_; 58 base::TimeDelta passed_;
59 59
60 // The time that the timer was last started. 60 // The time that the timer was last started.
61 base::Time start_time_; 61 base::Time start_time_;
62 62
63 // Callback recipient. 63 // Callback recipient.
64 base::WeakPtr<Delegate> timer_delegate_; 64 base::WeakPtr<Delegate> timer_delegate_;
65 65
66 // The actual timer. 66 // The actual timer.
67 scoped_ptr<base::OneShotTimer> timer_; 67 std::unique_ptr<base::OneShotTimer> timer_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(PopupTimer); 69 DISALLOW_COPY_AND_ASSIGN(PopupTimer);
70 }; 70 };
71 71
72 } // namespace message_center 72 } // namespace message_center
73 73
74 #endif // UI_MESSAGE_CENTER_POPUP_TIMER_H_ 74 #endif // UI_MESSAGE_CENTER_POPUP_TIMER_H_
OLDNEW
« no previous file with comments | « ui/message_center/notification_list_unittest.cc ('k') | ui/message_center/popup_timers_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698