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

Unified Diff: sync/engine/cleanup_disabled_types_command.h

Issue 10541079: [Sync] Remove CleanupDisabledTypes command and move purge logic into SyncManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test Created 8 years, 5 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 | « no previous file | sync/engine/cleanup_disabled_types_command.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/cleanup_disabled_types_command.h
diff --git a/sync/engine/cleanup_disabled_types_command.h b/sync/engine/cleanup_disabled_types_command.h
deleted file mode 100644
index 2090f1dfaa6a3004a6e5cd5c599cb2e8a5ba89b0..0000000000000000000000000000000000000000
--- a/sync/engine/cleanup_disabled_types_command.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2012 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_CLEANUP_DISABLED_TYPES_COMMAND_H_
-#define SYNC_ENGINE_CLEANUP_DISABLED_TYPES_COMMAND_H_
-
-#include "base/compiler_specific.h"
-#include "sync/engine/syncer_command.h"
-
-namespace syncer {
-
-// A syncer command that purges (from memory and disk) entries belonging to
-// a ModelType or ServerModelType that the user has not elected to sync.
-//
-// This is done as part of a session to 1) ensure it does not block the UI,
-// and 2) avoid complicated races that could arise between a) deleting
-// things b) a sync session trying to use these things c) and the potential
-// re-enabling of the data type by the user before some scheduled deletion
-// took place. Here, we are safe to perform I/O synchronously and we know it
-// is a safe time to delete as we are in the only active session.
-//
-// The removal from memory is done synchronously, while the disk purge is left
-// to an asynchronous SaveChanges operation. However, all the updates for
-// meta data fields (such as initial_sync_ended) as well as the actual entry
-// deletions will be committed in a single sqlite transaction. Thus it is
-// possible that disabled types re-appear (in the sync db) after a reboot,
-// but things will remain in a consistent state. This kind of error case is
-// cared for in this command by retrying; see ExecuteImpl.
-class CleanupDisabledTypesCommand : public SyncerCommand {
- public:
- CleanupDisabledTypesCommand();
- virtual ~CleanupDisabledTypesCommand();
-
- // SyncerCommand implementation.
- virtual SyncerError ExecuteImpl(sessions::SyncSession* session) OVERRIDE;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CleanupDisabledTypesCommand);
-};
-
-} // namespace syncer
-
-#endif // SYNC_ENGINE_CLEANUP_DISABLED_TYPES_COMMAND_H_
« no previous file with comments | « no previous file | sync/engine/cleanup_disabled_types_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698