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

Unified Diff: sync/engine/directory_update_handler.cc

Issue 161253002: sync: Add interfaces for per-type sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another win compile fix Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/engine/directory_update_handler.h ('k') | sync/engine/directory_update_handler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/directory_update_handler.cc
diff --git a/sync/engine/sync_directory_update_handler.cc b/sync/engine/directory_update_handler.cc
similarity index 88%
rename from sync/engine/sync_directory_update_handler.cc
rename to sync/engine/directory_update_handler.cc
index 3acfea4b948df0aaaaab3112311dcb1fde1d5ea8..654583b973fc48b0b01b5d3a3d7046ed3e455bc6 100644
--- a/sync/engine/sync_directory_update_handler.cc
+++ b/sync/engine/directory_update_handler.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "sync/engine/sync_directory_update_handler.h"
+#include "sync/engine/directory_update_handler.h"
#include "sync/engine/conflict_resolver.h"
#include "sync/engine/process_updates_util.h"
@@ -16,7 +16,7 @@ namespace syncer {
using syncable::SYNCER;
-SyncDirectoryUpdateHandler::SyncDirectoryUpdateHandler(
+DirectoryUpdateHandler::DirectoryUpdateHandler(
syncable::Directory* dir,
ModelType type,
scoped_refptr<ModelSafeWorker> worker)
@@ -24,14 +24,14 @@ SyncDirectoryUpdateHandler::SyncDirectoryUpdateHandler(
type_(type),
worker_(worker) {}
-SyncDirectoryUpdateHandler::~SyncDirectoryUpdateHandler() {}
+DirectoryUpdateHandler::~DirectoryUpdateHandler() {}
-void SyncDirectoryUpdateHandler::GetDownloadProgress(
+void DirectoryUpdateHandler::GetDownloadProgress(
sync_pb::DataTypeProgressMarker* progress_marker) const {
dir_->GetDownloadProgress(type_, progress_marker);
}
-void SyncDirectoryUpdateHandler::ProcessGetUpdatesResponse(
+void DirectoryUpdateHandler::ProcessGetUpdatesResponse(
const sync_pb::DataTypeProgressMarker& progress_marker,
const SyncEntityList& applicable_updates,
sessions::StatusController* status) {
@@ -40,8 +40,7 @@ void SyncDirectoryUpdateHandler::ProcessGetUpdatesResponse(
UpdateProgressMarker(progress_marker);
}
-void SyncDirectoryUpdateHandler::ApplyUpdates(
- sessions::StatusController* status) {
+void DirectoryUpdateHandler::ApplyUpdates(sessions::StatusController* status) {
if (!IsApplyUpdatesRequired()) {
return;
}
@@ -49,14 +48,14 @@ void SyncDirectoryUpdateHandler::ApplyUpdates(
// This will invoke handlers that belong to the model and its thread, so we
// switch to the appropriate thread before we start this work.
WorkCallback c = base::Bind(
- &SyncDirectoryUpdateHandler::ApplyUpdatesImpl,
+ &DirectoryUpdateHandler::ApplyUpdatesImpl,
// We wait until the callback is executed. We can safely use Unretained.
base::Unretained(this),
base::Unretained(status));
worker_->DoWorkAndWaitUntilDone(c);
}
-void SyncDirectoryUpdateHandler::PassiveApplyUpdates(
+void DirectoryUpdateHandler::PassiveApplyUpdates(
sessions::StatusController* status) {
if (!IsApplyUpdatesRequired()) {
return;
@@ -66,7 +65,7 @@ void SyncDirectoryUpdateHandler::PassiveApplyUpdates(
ApplyUpdatesImpl(status);
}
-SyncerError SyncDirectoryUpdateHandler::ApplyUpdatesImpl(
+SyncerError DirectoryUpdateHandler::ApplyUpdatesImpl(
sessions::StatusController* status) {
syncable::WriteTransaction trans(FROM_HERE, syncable::SYNCER, dir_);
@@ -133,7 +132,7 @@ SyncerError SyncDirectoryUpdateHandler::ApplyUpdatesImpl(
return SYNCER_OK;
}
-bool SyncDirectoryUpdateHandler::IsApplyUpdatesRequired() {
+bool DirectoryUpdateHandler::IsApplyUpdatesRequired() {
if (IsControlType(type_)) {
return false; // We don't process control types here.
}
@@ -141,14 +140,14 @@ bool SyncDirectoryUpdateHandler::IsApplyUpdatesRequired() {
return dir_->TypeHasUnappliedUpdates(type_);
}
-void SyncDirectoryUpdateHandler::UpdateSyncEntities(
+void DirectoryUpdateHandler::UpdateSyncEntities(
syncable::ModelNeutralWriteTransaction* trans,
const SyncEntityList& applicable_updates,
sessions::StatusController* status) {
ProcessDownloadedUpdates(dir_, trans, type_, applicable_updates, status);
}
-void SyncDirectoryUpdateHandler::UpdateProgressMarker(
+void DirectoryUpdateHandler::UpdateProgressMarker(
const sync_pb::DataTypeProgressMarker& progress_marker) {
int field_number = progress_marker.data_type_id();
ModelType model_type = GetModelTypeFromSpecificsFieldNumber(field_number);
« no previous file with comments | « sync/engine/directory_update_handler.h ('k') | sync/engine/directory_update_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698