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

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

Issue 905853002: Sync commit errors should temporarily re-enable trigger pre-commit getupdates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | sync/engine/commit.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 SYNC_ENGINE_COMMIT_H_ 5 #ifndef SYNC_ENGINE_COMMIT_H_
6 #define SYNC_ENGINE_COMMIT_H_ 6 #define SYNC_ENGINE_COMMIT_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
11 #include "sync/base/sync_export.h" 11 #include "sync/base/sync_export.h"
12 #include "sync/engine/commit_contribution.h" 12 #include "sync/engine/commit_contribution.h"
13 #include "sync/internal_api/public/base/model_type.h" 13 #include "sync/internal_api/public/base/model_type.h"
14 #include "sync/internal_api/public/engine/model_safe_worker.h" 14 #include "sync/internal_api/public/engine/model_safe_worker.h"
15 #include "sync/internal_api/public/util/syncer_error.h" 15 #include "sync/internal_api/public/util/syncer_error.h"
16 #include "sync/protocol/sync.pb.h" 16 #include "sync/protocol/sync.pb.h"
17 #include "sync/sessions/nudge_tracker.h"
17 #include "sync/util/extensions_activity.h" 18 #include "sync/util/extensions_activity.h"
18 19
19 namespace syncer { 20 namespace syncer {
20 21
21 namespace sessions { 22 namespace sessions {
22 class StatusController; 23 class StatusController;
23 class SyncSession; 24 class SyncSession;
24 } 25 }
25 26
26 class CommitProcessor; 27 class CommitProcessor;
(...skipping 20 matching lines...) Expand all
47 48
48 static Commit* Init( 49 static Commit* Init(
49 ModelTypeSet requested_types, 50 ModelTypeSet requested_types,
50 ModelTypeSet enabled_types, 51 ModelTypeSet enabled_types,
51 size_t max_entries, 52 size_t max_entries,
52 const std::string& account_name, 53 const std::string& account_name,
53 const std::string& cache_guid, 54 const std::string& cache_guid,
54 CommitProcessor* commit_processor, 55 CommitProcessor* commit_processor,
55 ExtensionsActivity* extensions_activity); 56 ExtensionsActivity* extensions_activity);
56 57
57 SyncerError PostAndProcessResponse( 58 SyncerError PostAndProcessResponse(sessions::NudgeTracker* nudge_tracker,
58 sessions::SyncSession* session, 59 sessions::SyncSession* session,
59 sessions::StatusController* status, 60 sessions::StatusController* status,
60 ExtensionsActivity* extensions_activity); 61 ExtensionsActivity* extensions_activity);
61 62
62 // Cleans up state associated with this commit. Must be called before the 63 // Cleans up state associated with this commit. Must be called before the
63 // destructor. 64 // destructor.
64 void CleanUp(); 65 void CleanUp();
65 66
66 private: 67 private:
67 typedef std::map<ModelType, CommitContribution*> ContributionMap; 68 typedef std::map<ModelType, CommitContribution*> ContributionMap;
68 69
69 ContributionMap contributions_; 70 ContributionMap contributions_;
70 STLValueDeleter<ContributionMap> deleter_; 71 STLValueDeleter<ContributionMap> deleter_;
71 72
72 sync_pb::ClientToServerMessage message_; 73 sync_pb::ClientToServerMessage message_;
73 sync_pb::ClientToServerResponse response_; 74 sync_pb::ClientToServerResponse response_;
74 ExtensionsActivity::Records extensions_activity_buffer_; 75 ExtensionsActivity::Records extensions_activity_buffer_;
75 76
76 // Debug only flag used to indicate if it's safe to destruct the object. 77 // Debug only flag used to indicate if it's safe to destruct the object.
77 bool cleaned_up_; 78 bool cleaned_up_;
78 }; 79 };
79 80
80 } // namespace syncer 81 } // namespace syncer
81 82
82 #endif // SYNC_ENGINE_COMMIT_H_ 83 #endif // SYNC_ENGINE_COMMIT_H_
OLDNEW
« no previous file with comments | « no previous file | sync/engine/commit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698