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

Unified Diff: chrome/browser/sync/glue/history_delete_directives_data_type_controller.cc

Issue 534733002: Revert "[Sync] Move DataTypeStatusTable ownership into DataTypeManager." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
Index: chrome/browser/sync/glue/history_delete_directives_data_type_controller.cc
diff --git a/chrome/browser/sync/glue/history_delete_directives_data_type_controller.cc b/chrome/browser/sync/glue/history_delete_directives_data_type_controller.cc
deleted file mode 100644
index 3a9098547448b2ab2ea14efa005a5011db06c4b8..0000000000000000000000000000000000000000
--- a/chrome/browser/sync/glue/history_delete_directives_data_type_controller.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// 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 "chrome/browser/sync/glue/history_delete_directives_data_type_controller.h"
-
-#include "chrome/browser/sync/glue/chrome_report_unrecoverable_error.h"
-#include "chrome/browser/sync/profile_sync_service.h"
-#include "content/public/browser/browser_thread.h"
-
-using content::BrowserThread;
-
-namespace browser_sync {
-
-HistoryDeleteDirectivesDataTypeController::
- HistoryDeleteDirectivesDataTypeController(
- sync_driver::SyncApiComponentFactory* factory,
- ProfileSyncService* sync_service)
- : sync_driver::UIDataTypeController(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
- base::Bind(&ChromeReportUnrecoverableError),
- syncer::HISTORY_DELETE_DIRECTIVES,
- factory),
- sync_service_(sync_service) {
- sync_service_->AddObserver(this);
-}
-
-HistoryDeleteDirectivesDataTypeController::
- ~HistoryDeleteDirectivesDataTypeController() {
- sync_service_->RemoveObserver(this);
-}
-
-bool HistoryDeleteDirectivesDataTypeController::ReadyForStart() const {
- return !sync_service_->EncryptEverythingEnabled();
-}
-
-void HistoryDeleteDirectivesDataTypeController::OnStateChanged() {
- if ((state() != NOT_RUNNING || state() != STOPPING) &&
- sync_service_->ShouldPushChanges() && !ReadyForStart()) {
- syncer::SyncError error(
- FROM_HERE,
- syncer::SyncError::DATATYPE_POLICY_ERROR,
- "Delete directives not supported with encryption.",
- type());
- OnSingleDataTypeUnrecoverableError(error);
- }
-}
-
-} // namespace browser_sync

Powered by Google App Engine
This is Rietveld 408576698