| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_SYNC_NOTIFIER_CHROME_SYSTEM_RESOURCES_H_ | 9 #ifndef CHROME_BROWSER_SYNC_NOTIFIER_CHROME_SYSTEM_RESOURCES_H_ |
| 10 #define CHROME_BROWSER_SYNC_NOTIFIER_CHROME_SYSTEM_RESOURCES_H_ | 10 #define CHROME_BROWSER_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 | 15 |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/message_loop.h" | 17 #include "base/message_loop.h" |
| 18 #include "base/task.h" | 18 #include "base/task.h" |
| 19 #include "base/threading/non_thread_safe.h" | 19 #include "base/threading/non_thread_safe.h" |
| 20 #include "chrome/browser/sync/notifier/state_writer.h" | 20 #include "chrome/browser/sync/notifier/state_writer.h" |
| 21 #include "google/cacheinvalidation/invalidation-client.h" | 21 #include "google/cacheinvalidation/invalidation-client.h" |
| 22 | 22 |
| 23 namespace sync_notifier { | 23 namespace sync_notifier { |
| 24 | 24 |
| 25 class ChromeSystemResources : public invalidation::SystemResources { | 25 class ChromeSystemResources : public invalidation::SystemResources { |
| 26 public: | 26 public: |
| 27 explicit ChromeSystemResources(StateWriter* state_writer); | 27 explicit ChromeSystemResources(StateWriter* state_writer); |
| 28 | 28 |
| 29 ~ChromeSystemResources(); | 29 virtual ~ChromeSystemResources(); |
| 30 | 30 |
| 31 // invalidation::SystemResources implementation. | 31 // invalidation::SystemResources implementation. |
| 32 | 32 |
| 33 virtual invalidation::Time current_time(); | 33 virtual invalidation::Time current_time(); |
| 34 | 34 |
| 35 virtual void StartScheduler(); | 35 virtual void StartScheduler(); |
| 36 | 36 |
| 37 virtual void StopScheduler(); | 37 virtual void StopScheduler(); |
| 38 | 38 |
| 39 virtual void ScheduleWithDelay(invalidation::TimeDelta delay, | 39 virtual void ScheduleWithDelay(invalidation::TimeDelta delay, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 void RunPostedTask(invalidation::Closure* task); | 71 void RunPostedTask(invalidation::Closure* task); |
| 72 | 72 |
| 73 // Runs the given storage callback with "true" and deletes it. | 73 // Runs the given storage callback with "true" and deletes it. |
| 74 void RunAndDeleteStorageCallback( | 74 void RunAndDeleteStorageCallback( |
| 75 invalidation::StorageCallback* callback); | 75 invalidation::StorageCallback* callback); |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 } // namespace sync_notifier | 78 } // namespace sync_notifier |
| 79 | 79 |
| 80 #endif // CHROME_BROWSER_SYNC_NOTIFIER_CHROME_SYSTEM_RESOURCES_H_ | 80 #endif // CHROME_BROWSER_SYNC_NOTIFIER_CHROME_SYSTEM_RESOURCES_H_ |
| OLD | NEW |