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

Unified Diff: sync/sessions/sync_session_context.h

Issue 11314008: sync: Follow-up to conflict resolution refactor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/sessions/sync_session.cc ('k') | sync/sessions/sync_session_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/sessions/sync_session_context.h
diff --git a/sync/sessions/sync_session_context.h b/sync/sessions/sync_session_context.h
index e1933c7d6b25cd36513dd2d5387097eb97337ee3..16b56be5e56f2fe1b1439dea99b0ef7f93c249d8 100644
--- a/sync/sessions/sync_session_context.h
+++ b/sync/sessions/sync_session_context.h
@@ -31,7 +31,6 @@
namespace syncer {
-class ConflictResolver;
class ExtensionsActivityMonitor;
class ServerConnectionManager;
class ThrottledDataTypeTracker;
@@ -44,7 +43,6 @@ class Directory;
static const int kDefaultMaxCommitBatchSize = 25;
namespace sessions {
-class ScopedSessionContextConflictResolver;
class TestScopedSessionEventListener;
class SyncSessionContext {
@@ -61,7 +59,6 @@ class SyncSessionContext {
~SyncSessionContext();
- ConflictResolver* resolver() { return resolver_; }
ServerConnectionManager* connection_manager() {
return connection_manager_;
}
@@ -136,12 +133,8 @@ class SyncSessionContext {
// Rather than force clients to set and null-out various context members, we
// extend our encapsulation boundary to scoped helpers that take care of this
// once they are allocated. See definitions of these below.
- friend class ScopedSessionContextConflictResolver;
friend class TestScopedSessionEventListener;
- // This is installed by Syncer objects when needed and may be NULL.
- ConflictResolver* resolver_;
-
ObserverList<SyncEngineEventListener> listeners_;
ServerConnectionManager* const connection_manager_;
@@ -187,29 +180,6 @@ class SyncSessionContext {
DISALLOW_COPY_AND_ASSIGN(SyncSessionContext);
};
-// Installs a ConflictResolver to a given session context for the lifetime of
-// the ScopedSessionContextConflictResolver. There should never be more than
-// one ConflictResolver in the system, so it is an error to use this if the
-// context already has a resolver.
-class ScopedSessionContextConflictResolver {
- public:
- // Note: |context| and |resolver| should outlive |this|.
- ScopedSessionContextConflictResolver(SyncSessionContext* context,
- ConflictResolver* resolver)
- : context_(context), resolver_(resolver) {
- DCHECK(NULL == context->resolver_);
- context->resolver_ = resolver;
- }
- ~ScopedSessionContextConflictResolver() {
- context_->resolver_ = NULL;
- }
-
- private:
- SyncSessionContext* context_;
- ConflictResolver* resolver_;
- DISALLOW_COPY_AND_ASSIGN(ScopedSessionContextConflictResolver);
-};
-
} // namespace sessions
} // namespace syncer
« no previous file with comments | « sync/sessions/sync_session.cc ('k') | sync/sessions/sync_session_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698