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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/base/lazy_now.h

Issue 2836853003: scheduler: Use PLATFORM_EXPORT instead of BLINK_PLATFORM_EXPORT (Closed)
Patch Set: Rebased Created 3 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scheduler/base/queueing_time_estimator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_LAZY_NOW_H_ 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_LAZY_NOW_H_
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_LAZY_NOW_H_ 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_LAZY_NOW_H_
7 7
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "public/platform/WebCommon.h" 9 #include "platform/PlatformExport.h"
10 10
11 namespace base { 11 namespace base {
12 class TickClock; 12 class TickClock;
13 } 13 }
14 14
15 namespace blink { 15 namespace blink {
16 namespace scheduler { 16 namespace scheduler {
17 17
18 // Now() is somewhat expensive so it makes sense not to call Now() unless we 18 // Now() is somewhat expensive so it makes sense not to call Now() unless we
19 // really need to. 19 // really need to.
20 class BLINK_PLATFORM_EXPORT LazyNow { 20 class PLATFORM_EXPORT LazyNow {
21 public: 21 public:
22 explicit LazyNow(base::TimeTicks now) : tick_clock_(nullptr), now_(now) { 22 explicit LazyNow(base::TimeTicks now) : tick_clock_(nullptr), now_(now) {
23 DCHECK(!now.is_null()); 23 DCHECK(!now.is_null());
24 } 24 }
25 25
26 explicit LazyNow(base::TickClock* tick_clock) : tick_clock_(tick_clock) {} 26 explicit LazyNow(base::TickClock* tick_clock) : tick_clock_(tick_clock) {}
27 27
28 base::TimeTicks Now(); 28 base::TimeTicks Now();
29 29
30 private: 30 private:
31 base::TickClock* tick_clock_; // NOT OWNED 31 base::TickClock* tick_clock_; // NOT OWNED
32 base::TimeTicks now_; 32 base::TimeTicks now_;
33 }; 33 };
34 34
35 } // namespace scheduler 35 } // namespace scheduler
36 } // namespace blink 36 } // namespace blink
37 37
38 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_LAZY_NOW_H_ 38 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_LAZY_NOW_H_
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scheduler/base/queueing_time_estimator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698