| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_SYNC_GLUE_HISTORY_MODEL_WORKER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_HISTORY_MODEL_WORKER_H_ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_HISTORY_MODEL_WORKER_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_HISTORY_MODEL_WORKER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/sync/engine/model_safe_worker.h" | 9 #include "chrome/browser/sync/engine/model_safe_worker.h" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 // A ModelSafeWorker for history models that accepts requests | 24 // A ModelSafeWorker for history models that accepts requests |
| 25 // from the syncapi that need to be fulfilled on the history thread. | 25 // from the syncapi that need to be fulfilled on the history thread. |
| 26 class HistoryModelWorker : public browser_sync::ModelSafeWorker, | 26 class HistoryModelWorker : public browser_sync::ModelSafeWorker, |
| 27 public CancelableRequestConsumerBase { | 27 public CancelableRequestConsumerBase { |
| 28 public: | 28 public: |
| 29 explicit HistoryModelWorker(HistoryService* history_service); | 29 explicit HistoryModelWorker(HistoryService* history_service); |
| 30 virtual ~HistoryModelWorker(); | 30 virtual ~HistoryModelWorker(); |
| 31 | 31 |
| 32 // ModelSafeWorker implementation. Called on syncapi SyncerThread. | 32 // ModelSafeWorker implementation. Called on syncapi SyncerThread. |
| 33 virtual void DoWorkAndWaitUntilDone(Callback0::Type* work); | 33 virtual void DoWorkAndWaitUntilDone(Callback0::Type* work); |
| 34 virtual ModelSafeGroup GetModelSafeGroup() { return GROUP_HISTORY; } | 34 virtual ModelSafeGroup GetModelSafeGroup(); |
| 35 virtual bool CurrentThreadIsWorkThread(); | 35 virtual bool CurrentThreadIsWorkThread(); |
| 36 | 36 |
| 37 // CancelableRequestConsumerBase implementation. | 37 // CancelableRequestConsumerBase implementation. |
| 38 virtual void OnRequestAdded(CancelableRequestProvider* provider, | 38 virtual void OnRequestAdded(CancelableRequestProvider* provider, |
| 39 CancelableRequestProvider::Handle handle) {} | 39 CancelableRequestProvider::Handle handle) {} |
| 40 | 40 |
| 41 virtual void OnRequestRemoved(CancelableRequestProvider* provider, | 41 virtual void OnRequestRemoved(CancelableRequestProvider* provider, |
| 42 CancelableRequestProvider::Handle handle) {} | 42 CancelableRequestProvider::Handle handle) {} |
| 43 | 43 |
| 44 virtual void WillExecute(CancelableRequestProvider* provider, | 44 virtual void WillExecute(CancelableRequestProvider* provider, |
| 45 CancelableRequestProvider::Handle handle) {} | 45 CancelableRequestProvider::Handle handle) {} |
| 46 | 46 |
| 47 virtual void DidExecute(CancelableRequestProvider* provider, | 47 virtual void DidExecute(CancelableRequestProvider* provider, |
| 48 CancelableRequestProvider::Handle handle) {} | 48 CancelableRequestProvider::Handle handle) {} |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 scoped_refptr<HistoryService> history_service_; | 51 scoped_refptr<HistoryService> history_service_; |
| 52 DISALLOW_COPY_AND_ASSIGN(HistoryModelWorker); | 52 DISALLOW_COPY_AND_ASSIGN(HistoryModelWorker); |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 } // namespace browser_sync | 55 } // namespace browser_sync |
| 56 | 56 |
| 57 #endif // CHROME_BROWSER_SYNC_GLUE_HISTORY_MODEL_WORKER_H_ | 57 #endif // CHROME_BROWSER_SYNC_GLUE_HISTORY_MODEL_WORKER_H_ |
| OLD | NEW |