| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/history/core/browser/history_delete_directives_data_type_co
ntroller.h" | 5 #include "components/history/core/browser/history_delete_directives_data_type_co
ntroller.h" |
| 6 | 6 |
| 7 #include "components/sync/driver/sync_client.h" | 7 #include "components/sync/driver/sync_client.h" |
| 8 #include "components/sync/driver/sync_service.h" | 8 #include "components/sync/driver/sync_service.h" |
| 9 | 9 |
| 10 namespace browser_sync { | 10 namespace browser_sync { |
| 11 | 11 |
| 12 HistoryDeleteDirectivesDataTypeController:: | 12 HistoryDeleteDirectivesDataTypeController:: |
| 13 HistoryDeleteDirectivesDataTypeController(const base::Closure& dump_stack, | 13 HistoryDeleteDirectivesDataTypeController( |
| 14 syncer::SyncClient* sync_client) | 14 const base::Closure& dump_stack, |
| 15 : syncer::UIDataTypeController(syncer::HISTORY_DELETE_DIRECTIVES, | 15 sync_driver::SyncClient* sync_client) |
| 16 dump_stack, | 16 : sync_driver::UIDataTypeController(syncer::HISTORY_DELETE_DIRECTIVES, |
| 17 sync_client), | 17 dump_stack, |
| 18 sync_client), |
| 18 sync_client_(sync_client) {} | 19 sync_client_(sync_client) {} |
| 19 | 20 |
| 20 HistoryDeleteDirectivesDataTypeController:: | 21 HistoryDeleteDirectivesDataTypeController:: |
| 21 ~HistoryDeleteDirectivesDataTypeController() { | 22 ~HistoryDeleteDirectivesDataTypeController() { |
| 22 } | 23 } |
| 23 | 24 |
| 24 bool HistoryDeleteDirectivesDataTypeController::ReadyForStart() const { | 25 bool HistoryDeleteDirectivesDataTypeController::ReadyForStart() const { |
| 25 DCHECK(CalledOnValidThread()); | 26 DCHECK(CalledOnValidThread()); |
| 26 return !sync_client_->GetSyncService()->IsEncryptEverythingEnabled(); | 27 return !sync_client_->GetSyncService()->IsEncryptEverythingEnabled(); |
| 27 } | 28 } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 57 syncer::SyncError error( | 58 syncer::SyncError error( |
| 58 FROM_HERE, | 59 FROM_HERE, |
| 59 syncer::SyncError::DATATYPE_POLICY_ERROR, | 60 syncer::SyncError::DATATYPE_POLICY_ERROR, |
| 60 "Delete directives not supported with encryption.", | 61 "Delete directives not supported with encryption.", |
| 61 type()); | 62 type()); |
| 62 CreateErrorHandler()->OnUnrecoverableError(error); | 63 CreateErrorHandler()->OnUnrecoverableError(error); |
| 63 return true; | 64 return true; |
| 64 } | 65 } |
| 65 | 66 |
| 66 } // namespace browser_sync | 67 } // namespace browser_sync |
| OLD | NEW |