forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sync: Support nudges from non-blocking sync types
Implements support for receiving nudges from the non-blocking sync engine. When a non-blocking sync type requests a commit, it will also send a request to the sync scheduler asking it to schedule a sync cycle for some time in the future. Adds some of the code required to support refresh requests, but does not include an interface to allow clients of the non-blocking sync API to access it. Adds basic support for the initial download nudge. When a non-blocking type starts syncing for the first time, it sends a request to the scheduler asking it to download any data available on the server. This allows it to complete initial sync quickly and without putting the scheduler into configure mode. For now, this looks like a refresh request in the sync protocol. This will be changed in a future CL. BUG=351005 Review URL: https://codereview.chromium.org/375023002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282439 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
rlarocque@chromium.org
committed
Jul 10, 2014
1 parent
b9f4c68
commit 1eed4f1
Showing
17 changed files
with
259 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright 2014 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. | ||
|
||
#include "sync/engine/nudge_handler.h" | ||
|
||
namespace syncer { | ||
|
||
NudgeHandler::NudgeHandler() { | ||
} | ||
|
||
NudgeHandler::~NudgeHandler() { | ||
} | ||
|
||
} // namespace syncer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright 2014 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_NUDGE_HANDLER_H_ | ||
#define SYNC_ENGINE_NUDGE_HANDLER_H_ | ||
|
||
#include "base/compiler_specific.h" | ||
#include "sync/base/sync_export.h" | ||
#include "sync/internal_api/public/base/model_type.h" | ||
|
||
namespace syncer { | ||
|
||
class SYNC_EXPORT_PRIVATE NudgeHandler { | ||
public: | ||
NudgeHandler(); | ||
virtual ~NudgeHandler(); | ||
|
||
virtual void NudgeForInitialDownload(syncer::ModelType type) = 0; | ||
virtual void NudgeForCommit(syncer::ModelType type) = 0; | ||
virtual void NudgeForRefresh(syncer::ModelType type) = 0; | ||
}; | ||
|
||
} // namespace syncer | ||
|
||
#endif // SYNC_ENGINE_NUDGE_HANDLER_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.