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

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

Issue 194065: Initial commit of sync engine code to browser/sync.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fixes to gtest include path, reverted syncapi. Created 11 years, 3 months 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCER_COMMAND_H_
6 #define CHROME_BROWSER_SYNC_ENGINE_SYNCER_COMMAND_H_
7
8 #include "base/basictypes.h"
9
10 namespace browser_sync {
11
12 class SyncerSession;
13
14 // Implementation of a simple command pattern intended to be driven by the
15 // Syncer. SyncerCommand is abstract and all subclasses must
16 // implement ExecuteImpl(). This is done so that chunks of syncer operation
17 // can be unit tested.
18 //
19 // Example Usage:
20 //
21 // SyncerSession session = ...;
22 // SyncerCommand *cmd = SomeCommandFactory.createCommand(...);
23 // cmd->Execute(session);
24 // delete cmd;
25 //
26
27 class SyncerCommand {
28 public:
29 SyncerCommand();
30 virtual ~SyncerCommand();
31
32 // Execute dispatches to a derived class's ExecuteImpl.
33 void Execute(SyncerSession *session);
idana 2009/09/10 05:44:37 "SyncerSession *session" -> "SyncerSession* sessio
34
35 // ExecuteImpl is where derived classes actually do work.
36 virtual void ExecuteImpl(SyncerSession *session) = 0;
37 private:
38 void SendNotifications(SyncerSession *session);
39 DISALLOW_COPY_AND_ASSIGN(SyncerCommand);
40 };
41
42 } // namespace browser_sync
43
44 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_COMMAND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698