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

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

Issue 333041: Take 2 at browser_sync::ExtensionsActivityMonitor.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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_PROCESS_COMMIT_RESPONSE_COMMAND_H_ 5 #ifndef CHROME_BROWSER_SYNC_ENGINE_PROCESS_COMMIT_RESPONSE_COMMAND_H_
6 #define CHROME_BROWSER_SYNC_ENGINE_PROCESS_COMMIT_RESPONSE_COMMAND_H_ 6 #define CHROME_BROWSER_SYNC_ENGINE_PROCESS_COMMIT_RESPONSE_COMMAND_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "chrome/browser/sync/engine/model_changing_syncer_command.h" 11 #include "chrome/browser/sync/engine/model_changing_syncer_command.h"
12 #include "chrome/browser/sync/engine/syncer_session.h" 12 #include "chrome/browser/sync/engine/syncer_session.h"
13 #include "chrome/browser/sync/engine/syncproto.h" 13 #include "chrome/browser/sync/engine/syncproto.h"
14 14
15 namespace syncable { 15 namespace syncable {
16 class Id; 16 class Id;
17 class WriteTransaction; 17 class WriteTransaction;
18 class MutableEntry; 18 class MutableEntry;
19 } 19 }
20 20
21 namespace browser_sync { 21 namespace browser_sync {
22 22
23 class ProcessCommitResponseCommand : public ModelChangingSyncerCommand { 23 class ProcessCommitResponseCommand : public ModelChangingSyncerCommand {
24 public: 24 public:
25 25
26 ProcessCommitResponseCommand(); 26 explicit ProcessCommitResponseCommand(ExtensionsActivityMonitor* monitor);
27 virtual ~ProcessCommitResponseCommand(); 27 virtual ~ProcessCommitResponseCommand();
28 28
29 virtual void ModelChangingExecuteImpl(SyncerSession* session); 29 virtual void ModelChangingExecuteImpl(SyncerSession* session);
30 private: 30 private:
31 CommitResponse::RESPONSE_TYPE ProcessSingleCommitResponse( 31 CommitResponse::RESPONSE_TYPE ProcessSingleCommitResponse(
32 syncable::WriteTransaction* trans, 32 syncable::WriteTransaction* trans,
33 const sync_pb::CommitResponse_EntryResponse& pb_server_entry, 33 const sync_pb::CommitResponse_EntryResponse& pb_server_entry,
34 const syncable::Id& pre_commit_id, std::set<syncable::Id>* 34 const syncable::Id& pre_commit_id, std::set<syncable::Id>*
35 conflicting_new_directory_ids, 35 conflicting_new_directory_ids,
36 std::set<syncable::Id>* deleted_folders, 36 std::set<syncable::Id>* deleted_folders,
37 SyncerSession* const session); 37 SyncerSession* const session);
38 38
39 // Actually does the work of execute.
40 void ProcessCommitResponse(SyncerSession* session);
41
39 void ProcessSuccessfulCommitResponse(syncable::WriteTransaction* trans, 42 void ProcessSuccessfulCommitResponse(syncable::WriteTransaction* trans,
40 const CommitResponse_EntryResponse& server_entry, 43 const CommitResponse_EntryResponse& server_entry,
41 const syncable::Id& pre_commit_id, syncable::MutableEntry* local_entry, 44 const syncable::Id& pre_commit_id, syncable::MutableEntry* local_entry,
42 bool syncing_was_set, std::set<syncable::Id>* deleted_folders, 45 bool syncing_was_set, std::set<syncable::Id>* deleted_folders,
43 SyncerSession* const session); 46 SyncerSession* const session);
44 47
45 void PerformCommitTimeNameAside( 48 void PerformCommitTimeNameAside(
46 syncable::WriteTransaction* trans, 49 syncable::WriteTransaction* trans,
47 const CommitResponse_EntryResponse& server_entry, 50 const CommitResponse_EntryResponse& server_entry,
48 syncable::MutableEntry* local_entry); 51 syncable::MutableEntry* local_entry);
49 52
53 // We may need to update this with records from a commit attempt if the
54 // attempt failed.
55 ExtensionsActivityMonitor* extensions_monitor_;
56
50 DISALLOW_COPY_AND_ASSIGN(ProcessCommitResponseCommand); 57 DISALLOW_COPY_AND_ASSIGN(ProcessCommitResponseCommand);
51 }; 58 };
52 59
53 } // namespace browser_sync 60 } // namespace browser_sync
54 61
55 #endif // CHROME_BROWSER_SYNC_ENGINE_PROCESS_COMMIT_RESPONSE_COMMAND_H_ 62 #endif // CHROME_BROWSER_SYNC_ENGINE_PROCESS_COMMIT_RESPONSE_COMMAND_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/build_commit_command.cc ('k') | chrome/browser/sync/engine/process_commit_response_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698