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

Side by Side Diff: sync/engine/commit_util.h

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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
« no previous file with comments | « sync/engine/commit_queue.cc ('k') | sync/engine/commit_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 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 SYNC_ENGINE_COMMIT_UTIL_H_
6 #define SYNC_ENGINE_COMMIT_UTIL_H_
7
8 #include <stdint.h>
9
10 #include <set>
11
12 #include "sync/base/sync_export.h"
13 #include "sync/internal_api/public/base/model_type.h"
14 #include "sync/protocol/sync.pb.h"
15 #include "sync/util/extensions_activity.h"
16
17 namespace sync_pb {
18 class CommitMessage;
19 class SyncEntity;
20 }
21
22 namespace syncer {
23
24 namespace syncable {
25 class BaseTransaction;
26 class Entry;
27 class Id;
28 class BaseWriteTransaction;
29 }
30
31 namespace commit_util {
32
33 // Adds bookmark extensions activity report to |message|.
34 SYNC_EXPORT void AddExtensionsActivityToMessage(
35 ExtensionsActivity* activity,
36 ExtensionsActivity::Records* extensions_activity_buffer,
37 sync_pb::CommitMessage* message);
38
39 // Fills the config_params field of |message|.
40 SYNC_EXPORT void AddClientConfigParamsToMessage(
41 ModelTypeSet enabled_types,
42 bool cookie_jar_mismatch,
43 sync_pb::CommitMessage* message);
44
45 // Takes a snapshot of |meta_entry| and puts it into a protobuf suitable for use
46 // in a commit request message.
47 SYNC_EXPORT void BuildCommitItem(const syncable::Entry& meta_entry,
48 sync_pb::SyncEntity* sync_entry);
49
50 // Process a single commit response. Updates the entry's SERVER fields using
51 // |pb_commit_response| and |pb_committed_entry|.
52 //
53 // The |deleted_folders| parameter is a set of IDs that represent deleted
54 // folders. This function will add its entry's ID to this set if it finds
55 // itself processing a folder deletion.
56 SYNC_EXPORT
57 sync_pb::CommitResponse::ResponseType ProcessSingleCommitResponse(
58 syncable::BaseWriteTransaction* trans,
59 const sync_pb::CommitResponse_EntryResponse& server_entry,
60 const sync_pb::SyncEntity& commit_request_entry,
61 int64_t metahandle,
62 std::set<syncable::Id>* deleted_folders);
63
64 } // namespace commit_util
65
66 } // namespace syncer
67
68 #endif // SYNC_ENGINE_COMMIT_UTIL_H_
OLDNEW
« no previous file with comments | « sync/engine/commit_queue.cc ('k') | sync/engine/commit_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698