OLD | NEW |
1 // Copyright (c) 2006-2009 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 #ifndef CHROME_BROWSER_SYNC_ENGINE_DOWNLOAD_UPDATES_COMMAND_H_ | 5 #ifndef CHROME_BROWSER_SYNC_ENGINE_DOWNLOAD_UPDATES_COMMAND_H_ |
6 #define CHROME_BROWSER_SYNC_ENGINE_DOWNLOAD_UPDATES_COMMAND_H_ | 6 #define CHROME_BROWSER_SYNC_ENGINE_DOWNLOAD_UPDATES_COMMAND_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" |
10 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
11 #include "chrome/browser/sync/engine/model_safe_worker.h" | 12 #include "chrome/browser/sync/engine/model_safe_worker.h" |
12 #include "chrome/browser/sync/engine/syncer_command.h" | 13 #include "chrome/browser/sync/engine/syncer_command.h" |
13 #include "chrome/browser/sync/protocol/sync.pb.h" | 14 #include "chrome/browser/sync/protocol/sync.pb.h" |
14 #include "chrome/browser/sync/syncable/model_type.h" | 15 #include "chrome/browser/sync/syncable/model_type.h" |
15 | 16 |
16 namespace sync_pb { | 17 namespace sync_pb { |
17 class EntitySpecifics; | 18 class EntitySpecifics; |
18 } | 19 } |
19 | 20 |
(...skipping 16 matching lines...) Expand all Loading... |
36 // In practice, DownloadUpdatesCommand should loop until all updates are | 37 // In practice, DownloadUpdatesCommand should loop until all updates are |
37 // downloaded for all enabled datatypes (i.e., until the server indicates | 38 // downloaded for all enabled datatypes (i.e., until the server indicates |
38 // changes_remaining == 0 in the GetUpdates response), or until an error | 39 // changes_remaining == 0 in the GetUpdates response), or until an error |
39 // is encountered. | 40 // is encountered. |
40 class DownloadUpdatesCommand : public SyncerCommand { | 41 class DownloadUpdatesCommand : public SyncerCommand { |
41 public: | 42 public: |
42 DownloadUpdatesCommand(); | 43 DownloadUpdatesCommand(); |
43 virtual ~DownloadUpdatesCommand(); | 44 virtual ~DownloadUpdatesCommand(); |
44 | 45 |
45 // SyncerCommand implementation. | 46 // SyncerCommand implementation. |
46 virtual void ExecuteImpl(sessions::SyncSession* session); | 47 virtual void ExecuteImpl(sessions::SyncSession* session) OVERRIDE; |
47 | 48 |
48 void SetRequestedTypes(const syncable::ModelTypeBitSet& target_datatypes, | 49 void SetRequestedTypes(const syncable::ModelTypeBitSet& target_datatypes, |
49 sync_pb::EntitySpecifics* filter_protobuf); | 50 sync_pb::EntitySpecifics* filter_protobuf); |
50 | 51 |
51 private: | 52 private: |
52 FRIEND_TEST_ALL_PREFIXES(DownloadUpdatesCommandTest, VerifyAppendDebugInfo); | 53 FRIEND_TEST_ALL_PREFIXES(DownloadUpdatesCommandTest, VerifyAppendDebugInfo); |
53 void AppendClientDebugInfoIfNeeded(sessions::SyncSession* session, | 54 void AppendClientDebugInfoIfNeeded(sessions::SyncSession* session, |
54 sync_pb::DebugInfo* debug_info); | 55 sync_pb::DebugInfo* debug_info); |
55 DISALLOW_COPY_AND_ASSIGN(DownloadUpdatesCommand); | 56 DISALLOW_COPY_AND_ASSIGN(DownloadUpdatesCommand); |
56 }; | 57 }; |
57 | 58 |
58 } // namespace browser_sync | 59 } // namespace browser_sync |
59 | 60 |
60 #endif // CHROME_BROWSER_SYNC_ENGINE_DOWNLOAD_UPDATES_COMMAND_H_ | 61 #endif // CHROME_BROWSER_SYNC_ENGINE_DOWNLOAD_UPDATES_COMMAND_H_ |
61 | 62 |
OLD | NEW |