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 #include "content/browser/time_zone_monitor.h" | 5 #include "content/browser/time_zone_monitor.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 namespace { | 25 namespace { |
26 class TimeZoneMonitorLinuxImpl; | 26 class TimeZoneMonitorLinuxImpl; |
27 } // namespace | 27 } // namespace |
28 | 28 |
29 class TimeZoneMonitorLinux : public TimeZoneMonitor { | 29 class TimeZoneMonitorLinux : public TimeZoneMonitor { |
30 public: | 30 public: |
31 TimeZoneMonitorLinux(); | 31 TimeZoneMonitorLinux(); |
32 ~TimeZoneMonitorLinux() override; | 32 ~TimeZoneMonitorLinux() override; |
33 | 33 |
34 void NotifyRenderersFromImpl() { | 34 void NotifyClientsFromImpl() { |
35 NotifyRenderers(); | 35 NotifyClients(); |
36 } | 36 } |
37 | 37 |
38 private: | 38 private: |
39 scoped_refptr<TimeZoneMonitorLinuxImpl> impl_; | 39 scoped_refptr<TimeZoneMonitorLinuxImpl> impl_; |
40 | 40 |
41 DISALLOW_COPY_AND_ASSIGN(TimeZoneMonitorLinux); | 41 DISALLOW_COPY_AND_ASSIGN(TimeZoneMonitorLinux); |
42 }; | 42 }; |
43 | 43 |
44 namespace { | 44 namespace { |
45 | 45 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 BrowserThread::PostTask( | 112 BrowserThread::PostTask( |
113 BrowserThread::UI, | 113 BrowserThread::UI, |
114 FROM_HERE, | 114 FROM_HERE, |
115 base::Bind(&TimeZoneMonitorLinuxImpl::OnTimeZoneFileChangedOnUIThread, | 115 base::Bind(&TimeZoneMonitorLinuxImpl::OnTimeZoneFileChangedOnUIThread, |
116 this)); | 116 this)); |
117 } | 117 } |
118 | 118 |
119 void OnTimeZoneFileChangedOnUIThread() { | 119 void OnTimeZoneFileChangedOnUIThread() { |
120 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 120 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
121 if (owner_) { | 121 if (owner_) { |
122 owner_->NotifyRenderersFromImpl(); | 122 owner_->NotifyClientsFromImpl(); |
123 } | 123 } |
124 } | 124 } |
125 | 125 |
126 std::vector<base::FilePathWatcher*> file_path_watchers_; | 126 std::vector<base::FilePathWatcher*> file_path_watchers_; |
127 TimeZoneMonitorLinux* owner_; | 127 TimeZoneMonitorLinux* owner_; |
128 | 128 |
129 DISALLOW_COPY_AND_ASSIGN(TimeZoneMonitorLinuxImpl); | 129 DISALLOW_COPY_AND_ASSIGN(TimeZoneMonitorLinuxImpl); |
130 }; | 130 }; |
131 | 131 |
132 } // namespace | 132 } // namespace |
(...skipping 26 matching lines...) Expand all Loading... |
159 } | 159 } |
160 | 160 |
161 // static | 161 // static |
162 std::unique_ptr<TimeZoneMonitor> TimeZoneMonitor::Create() { | 162 std::unique_ptr<TimeZoneMonitor> TimeZoneMonitor::Create() { |
163 return std::unique_ptr<TimeZoneMonitor>(new TimeZoneMonitorLinux()); | 163 return std::unique_ptr<TimeZoneMonitor>(new TimeZoneMonitorLinux()); |
164 } | 164 } |
165 | 165 |
166 } // namespace content | 166 } // namespace content |
167 | 167 |
168 #endif // !OS_CHROMEOS | 168 #endif // !OS_CHROMEOS |
OLD | NEW |