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

Unified Diff: sync/engine/download.h

Issue 15764010: Experimental functionize patch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync: Expose sync functionality as functions Created 7 years, 6 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/engine/commit.cc ('k') | sync/engine/download.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/download.h
diff --git a/sync/engine/download.h b/sync/engine/download.h
new file mode 100644
index 0000000000000000000000000000000000000000..55ac7ccc2b552c6129c5d5572834b24d72363ab0
--- /dev/null
+++ b/sync/engine/download.h
@@ -0,0 +1,59 @@
+// Copyright (c) 2013 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_ENGINE_DOWNLOAD_H_
+#define SYNC_ENGINE_DOWNLOAD_H_
+
+#include "sync/base/sync_export.h"
+#include "sync/internal_api/public/base/model_type.h"
+#include "sync/internal_api/public/util/syncer_error.h"
+
+namespace sync_pb {
+class DebugInfo;
+} // namespace sync_pb
+
+namespace syncer {
+
+namespace sessions {
+class NudgeTracker;
+class SyncSession;
+struct SyncSourceInfo;
+} // namespace sessions
+
+class Syncer;
+
+// This function executes a single GetUpdate request and stores the response in
+// the session's StatusController. It constructs the type of request used to
+// keep types in sync when in normal mode.
+SYNC_EXPORT_PRIVATE SyncerError NormalDownloadUpdates(
+ sessions::SyncSession* session,
+ bool create_mobile_bookmarks_folder,
+ ModelTypeSet request_types,
+ const sessions::NudgeTracker& nudge_tracker);
+
+// This function executes a single GetUpdate request and stores the response in
+// the session's StatusController. It constructs the type of request used to
+// initialize a type for the first time.
+SYNC_EXPORT_PRIVATE SyncerError ConfigureDownloadUpdates(
+ sessions::SyncSession* session,
+ bool create_mobile_bookmarks_folder,
+ const syncer::sessions::SyncSourceInfo& source,
+ ModelTypeSet request_types);
+
+// This function executes a single GetUpdate request and stores the response in
+// the session's status controller. It constructs the type of request used for
+// periodic polling.
+SYNC_EXPORT_PRIVATE SyncerError PollDownloadUpdates(
+ sessions::SyncSession* session,
+ bool create_mobile_bookmarks_folder,
+ ModelTypeSet request_types);
+
+// A helper to set debug info. Exposed only for testing.
+SYNC_EXPORT_PRIVATE void AppendClientDebugInfoIfNeeded(
+ sessions::SyncSession* session,
+ sync_pb::DebugInfo* debug_info);
+
+} // namespace syncer
+
+#endif // SYNC_ENGINE_DOWNLOAD_H_
« no previous file with comments | « sync/engine/commit.cc ('k') | sync/engine/download.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698