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

Unified Diff: sync/internal_api/public/activation_context.h

Issue 1368683003: USS SyncContextProxy / data type activation refactoring (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR feedback Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/internal_api/activation_context.cc ('k') | sync/internal_api/public/sync_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/public/activation_context.h
diff --git a/sync/internal_api/public/activation_context.h b/sync/internal_api/public/activation_context.h
new file mode 100644
index 0000000000000000000000000000000000000000..824aa9c799f5c183ae656bf6ba6ca9b4e56278fb
--- /dev/null
+++ b/sync/internal_api/public/activation_context.h
@@ -0,0 +1,36 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SYNC_INTERNAL_API_PUBLIC_ACTIVATION_CONTEXT_H_
+#define SYNC_INTERNAL_API_PUBLIC_ACTIVATION_CONTEXT_H_
+
+#include "base/memory/weak_ptr.h"
+#include "base/memory/ref_counted.h"
+#include "base/sequenced_task_runner.h"
+#include "sync/base/sync_export.h"
+#include "sync/internal_api/public/non_blocking_sync_common.h"
+
+namespace syncer_v2 {
+class ModelTypeProcessor;
+
+// The state passed from ModelTypeProcessor to Sync thread during DataType
+// activation.
+struct SYNC_EXPORT_PRIVATE ActivationContext {
+ ActivationContext();
+ ~ActivationContext();
+
+ // Initial DataTypeState at the moment of activation.
+ DataTypeState data_type_state;
+ // Pending updates from the previous session.
+ // TODO(stanisc): crbug.com/529498: should remove pending updates.
+ UpdateResponseDataList saved_pending_updates;
+ // Task runner for the data type.
+ scoped_refptr<base::SequencedTaskRunner> type_task_runner;
+ // ModelTypeProcessor for the data type.
+ base::WeakPtr<ModelTypeProcessor> type_processor;
+};
+
+} // namespace syncer_v2
+
+#endif // SYNC_INTERNAL_API_PUBLIC_ACTIVATION_CONTEXT_H_
« no previous file with comments | « sync/internal_api/activation_context.cc ('k') | sync/internal_api/public/sync_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698