Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1042)

Side by Side Diff: chrome/browser/sync/engine/build_and_process_conflict_sets_command.h

Issue 8637006: [Sync] Make syncer commands avoid posting tasks on threads with no work to do (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to head, fix windows compile Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef CHROME_BROWSER_SYNC_ENGINE_BUILD_AND_PROCESS_CONFLICT_SETS_COMMAND_H_ 5 #ifndef CHROME_BROWSER_SYNC_ENGINE_BUILD_AND_PROCESS_CONFLICT_SETS_COMMAND_H_
6 #define CHROME_BROWSER_SYNC_ENGINE_BUILD_AND_PROCESS_CONFLICT_SETS_COMMAND_H_ 6 #define CHROME_BROWSER_SYNC_ENGINE_BUILD_AND_PROCESS_CONFLICT_SETS_COMMAND_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 17 matching lines...) Expand all
28 namespace sessions { 28 namespace sessions {
29 class ConflictProgress; 29 class ConflictProgress;
30 class StatusController; 30 class StatusController;
31 } 31 }
32 32
33 class BuildAndProcessConflictSetsCommand : public ModelChangingSyncerCommand { 33 class BuildAndProcessConflictSetsCommand : public ModelChangingSyncerCommand {
34 public: 34 public:
35 BuildAndProcessConflictSetsCommand(); 35 BuildAndProcessConflictSetsCommand();
36 virtual ~BuildAndProcessConflictSetsCommand(); 36 virtual ~BuildAndProcessConflictSetsCommand();
37 37
38 protected:
38 // ModelChangingSyncerCommand implementation. 39 // ModelChangingSyncerCommand implementation.
40 virtual bool HasCustomGroupsToChange() const OVERRIDE;
41 virtual std::set<ModelSafeGroup> GetGroupsToChange(
42 const sessions::SyncSession& session) const OVERRIDE;
39 virtual void ModelChangingExecuteImpl( 43 virtual void ModelChangingExecuteImpl(
40 sessions::SyncSession* session) OVERRIDE; 44 sessions::SyncSession* session) OVERRIDE;
41 45
42 private: 46 private:
43 bool BuildAndProcessConflictSets(sessions::SyncSession* session); 47 bool BuildAndProcessConflictSets(sessions::SyncSession* session);
44 48
45 bool ProcessSingleDirectionConflictSets( 49 bool ProcessSingleDirectionConflictSets(
46 syncable::WriteTransaction* trans, ConflictResolver* resolver, 50 syncable::WriteTransaction* trans, ConflictResolver* resolver,
47 Cryptographer* cryptographer, sessions::StatusController* status, 51 Cryptographer* cryptographer, sessions::StatusController* status,
48 const ModelSafeRoutingInfo& routes); 52 const ModelSafeRoutingInfo& routes);
(...skipping 19 matching lines...) Expand all
68 void MergeSetsForPositionUpdate(syncable::BaseTransaction* trans, 72 void MergeSetsForPositionUpdate(syncable::BaseTransaction* trans,
69 syncable::Entry* entry, 73 syncable::Entry* entry,
70 sessions::ConflictProgress* conflict_progress); 74 sessions::ConflictProgress* conflict_progress);
71 75
72 DISALLOW_COPY_AND_ASSIGN(BuildAndProcessConflictSetsCommand); 76 DISALLOW_COPY_AND_ASSIGN(BuildAndProcessConflictSetsCommand);
73 }; 77 };
74 78
75 } // namespace browser_sync 79 } // namespace browser_sync
76 80
77 #endif // CHROME_BROWSER_SYNC_ENGINE_BUILD_AND_PROCESS_CONFLICT_SETS_COMMAND_H_ 81 #endif // CHROME_BROWSER_SYNC_ENGINE_BUILD_AND_PROCESS_CONFLICT_SETS_COMMAND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698