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

Side by Side Diff: content/browser/time_zone_monitor_linux.cc

Issue 2304073003: Mojoify time zone update IPC from browser to renderer (Closed)
Patch Set: Rebase Created 4 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
« no previous file with comments | « content/browser/time_zone_monitor_chromeos.cc ('k') | content/browser/time_zone_monitor_mac.mm » ('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 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
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() { NotifyClients(); }
35 NotifyRenderers();
36 }
37 35
38 private: 36 private:
39 scoped_refptr<TimeZoneMonitorLinuxImpl> impl_; 37 scoped_refptr<TimeZoneMonitorLinuxImpl> impl_;
40 38
41 DISALLOW_COPY_AND_ASSIGN(TimeZoneMonitorLinux); 39 DISALLOW_COPY_AND_ASSIGN(TimeZoneMonitorLinux);
42 }; 40 };
43 41
44 namespace { 42 namespace {
45 43
46 // FilePathWatcher needs to run on the FILE thread, but TimeZoneMonitor runs 44 // FilePathWatcher needs to run on the FILE thread, but TimeZoneMonitor runs
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 BrowserThread::PostTask( 110 BrowserThread::PostTask(
113 BrowserThread::UI, 111 BrowserThread::UI,
114 FROM_HERE, 112 FROM_HERE,
115 base::Bind(&TimeZoneMonitorLinuxImpl::OnTimeZoneFileChangedOnUIThread, 113 base::Bind(&TimeZoneMonitorLinuxImpl::OnTimeZoneFileChangedOnUIThread,
116 this)); 114 this));
117 } 115 }
118 116
119 void OnTimeZoneFileChangedOnUIThread() { 117 void OnTimeZoneFileChangedOnUIThread() {
120 DCHECK_CURRENTLY_ON(BrowserThread::UI); 118 DCHECK_CURRENTLY_ON(BrowserThread::UI);
121 if (owner_) { 119 if (owner_) {
122 owner_->NotifyRenderersFromImpl(); 120 owner_->NotifyClientsFromImpl();
123 } 121 }
124 } 122 }
125 123
126 std::vector<base::FilePathWatcher*> file_path_watchers_; 124 std::vector<base::FilePathWatcher*> file_path_watchers_;
127 TimeZoneMonitorLinux* owner_; 125 TimeZoneMonitorLinux* owner_;
128 126
129 DISALLOW_COPY_AND_ASSIGN(TimeZoneMonitorLinuxImpl); 127 DISALLOW_COPY_AND_ASSIGN(TimeZoneMonitorLinuxImpl);
130 }; 128 };
131 129
132 } // namespace 130 } // namespace
(...skipping 26 matching lines...) Expand all
159 } 157 }
160 158
161 // static 159 // static
162 std::unique_ptr<TimeZoneMonitor> TimeZoneMonitor::Create() { 160 std::unique_ptr<TimeZoneMonitor> TimeZoneMonitor::Create() {
163 return std::unique_ptr<TimeZoneMonitor>(new TimeZoneMonitorLinux()); 161 return std::unique_ptr<TimeZoneMonitor>(new TimeZoneMonitorLinux());
164 } 162 }
165 163
166 } // namespace content 164 } // namespace content
167 165
168 #endif // !OS_CHROMEOS 166 #endif // !OS_CHROMEOS
OLDNEW
« no previous file with comments | « content/browser/time_zone_monitor_chromeos.cc ('k') | content/browser/time_zone_monitor_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698