| 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 // Simple system resources class that uses the current message loop | 5 // Simple system resources class that uses the current message loop |
| 6 // for scheduling. Assumes the current message loop is already | 6 // for scheduling. Assumes the current message loop is already |
| 7 // running. | 7 // running. |
| 8 | 8 |
| 9 #ifndef SYNC_NOTIFIER_CHROME_SYSTEM_RESOURCES_H_ | 9 #ifndef SYNC_NOTIFIER_CHROME_SYSTEM_RESOURCES_H_ |
| 10 #define SYNC_NOTIFIER_CHROME_SYSTEM_RESOURCES_H_ | 10 #define SYNC_NOTIFIER_CHROME_SYSTEM_RESOURCES_H_ |
| 11 #pragma once | 11 #pragma once |
| 12 | 12 |
| 13 #include <set> | 13 #include <set> |
| 14 #include <string> | 14 #include <string> |
| 15 #include <vector> | 15 #include <vector> |
| 16 | 16 |
| 17 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
| 18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
| 19 #include "base/memory/weak_ptr.h" | 19 #include "base/memory/weak_ptr.h" |
| 20 #include "base/message_loop.h" | 20 #include "base/message_loop.h" |
| 21 #include "base/threading/non_thread_safe.h" | 21 #include "base/threading/non_thread_safe.h" |
| 22 #include "google/cacheinvalidation/include/system-resources.h" | 22 #include "google/cacheinvalidation/include/system-resources.h" |
| 23 #include "sync/notifier/push_client_channel.h" | 23 #include "sync/notifier/push_client_channel.h" |
| 24 #include "sync/notifier/state_writer.h" | 24 #include "sync/notifier/state_writer.h" |
| 25 | 25 |
| 26 namespace notifier { | 26 namespace notifier { |
| 27 class PushClient; | 27 class PushClient; |
| 28 } // namespace notifier | 28 } // namespace notifier |
| 29 | 29 |
| 30 namespace csync { | 30 namespace syncer { |
| 31 | 31 |
| 32 class ChromeLogger : public invalidation::Logger { | 32 class ChromeLogger : public invalidation::Logger { |
| 33 public: | 33 public: |
| 34 ChromeLogger(); | 34 ChromeLogger(); |
| 35 | 35 |
| 36 virtual ~ChromeLogger(); | 36 virtual ~ChromeLogger(); |
| 37 | 37 |
| 38 // invalidation::Logger implementation. | 38 // invalidation::Logger implementation. |
| 39 virtual void Log(LogLevel level, const char* file, int line, | 39 virtual void Log(LogLevel level, const char* file, int line, |
| 40 const char* format, ...) OVERRIDE; | 40 const char* format, ...) OVERRIDE; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 private: | 139 private: |
| 140 bool is_started_; | 140 bool is_started_; |
| 141 std::string platform_; | 141 std::string platform_; |
| 142 scoped_ptr<ChromeLogger> logger_; | 142 scoped_ptr<ChromeLogger> logger_; |
| 143 scoped_ptr<ChromeScheduler> internal_scheduler_; | 143 scoped_ptr<ChromeScheduler> internal_scheduler_; |
| 144 scoped_ptr<ChromeScheduler> listener_scheduler_; | 144 scoped_ptr<ChromeScheduler> listener_scheduler_; |
| 145 scoped_ptr<ChromeStorage> storage_; | 145 scoped_ptr<ChromeStorage> storage_; |
| 146 PushClientChannel push_client_channel_; | 146 PushClientChannel push_client_channel_; |
| 147 }; | 147 }; |
| 148 | 148 |
| 149 } // namespace csync | 149 } // namespace syncer |
| 150 | 150 |
| 151 #endif // SYNC_NOTIFIER_CHROME_SYSTEM_RESOURCES_H_ | 151 #endif // SYNC_NOTIFIER_CHROME_SYSTEM_RESOURCES_H_ |
| OLD | NEW |