OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "sync/notifier/sync_system_resources.h" | 5 #include "sync/notifier/sync_system_resources.h" |
6 | 6 |
7 #include <cstdlib> | 7 #include <cstdlib> |
8 #include <cstring> | 8 #include <cstring> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 logging::LogMessage(file, line, log_severity).stream() << result; | 54 logging::LogMessage(file, line, log_severity).stream() << result; |
55 va_end(ap); | 55 va_end(ap); |
56 } | 56 } |
57 } | 57 } |
58 | 58 |
59 void SyncLogger::SetSystemResources(invalidation::SystemResources* resources) { | 59 void SyncLogger::SetSystemResources(invalidation::SystemResources* resources) { |
60 // Do nothing. | 60 // Do nothing. |
61 } | 61 } |
62 | 62 |
63 SyncInvalidationScheduler::SyncInvalidationScheduler() | 63 SyncInvalidationScheduler::SyncInvalidationScheduler() |
64 : weak_factory_(this), | 64 : created_on_loop_(base::MessageLoop::current()), |
65 created_on_loop_(base::MessageLoop::current()), | |
66 is_started_(false), | 65 is_started_(false), |
67 is_stopped_(false) { | 66 is_stopped_(false), |
| 67 weak_factory_(this) { |
68 CHECK(created_on_loop_); | 68 CHECK(created_on_loop_); |
69 } | 69 } |
70 | 70 |
71 SyncInvalidationScheduler::~SyncInvalidationScheduler() { | 71 SyncInvalidationScheduler::~SyncInvalidationScheduler() { |
72 CHECK_EQ(created_on_loop_, base::MessageLoop::current()); | 72 CHECK_EQ(created_on_loop_, base::MessageLoop::current()); |
73 CHECK(is_stopped_); | 73 CHECK(is_stopped_); |
74 } | 74 } |
75 | 75 |
76 void SyncInvalidationScheduler::Start() { | 76 void SyncInvalidationScheduler::Start() { |
77 CHECK_EQ(created_on_loop_, base::MessageLoop::current()); | 77 CHECK_EQ(created_on_loop_, base::MessageLoop::current()); |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 | 246 |
247 SyncInvalidationScheduler* SyncSystemResources::internal_scheduler() { | 247 SyncInvalidationScheduler* SyncSystemResources::internal_scheduler() { |
248 return internal_scheduler_.get(); | 248 return internal_scheduler_.get(); |
249 } | 249 } |
250 | 250 |
251 SyncInvalidationScheduler* SyncSystemResources::listener_scheduler() { | 251 SyncInvalidationScheduler* SyncSystemResources::listener_scheduler() { |
252 return listener_scheduler_.get(); | 252 return listener_scheduler_.get(); |
253 } | 253 } |
254 | 254 |
255 } // namespace syncer | 255 } // namespace syncer |
OLD | NEW |