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

Side by Side Diff: components/history/core/browser/history_delete_directives_data_type_controller.cc

Issue 2549223003: [Sync] Rename NonUIDataTypeController to AsyncDirectoryTypeController (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
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 "base/threading/thread_task_runner_handle.h" 7 #include "base/threading/thread_task_runner_handle.h"
8 #include "components/sync/driver/sync_client.h" 8 #include "components/sync/driver/sync_client.h"
9 #include "components/sync/driver/sync_service.h" 9 #include "components/sync/driver/sync_service.h"
10 10
11 namespace browser_sync { 11 namespace browser_sync {
12 12
13 HistoryDeleteDirectivesDataTypeController:: 13 HistoryDeleteDirectivesDataTypeController::
14 HistoryDeleteDirectivesDataTypeController(const base::Closure& dump_stack, 14 HistoryDeleteDirectivesDataTypeController(const base::Closure& dump_stack,
15 syncer::SyncClient* sync_client) 15 syncer::SyncClient* sync_client)
16 : syncer::NonUIDataTypeController(syncer::HISTORY_DELETE_DIRECTIVES, 16 : syncer::AsyncDirectoryTypeController(syncer::HISTORY_DELETE_DIRECTIVES,
17 dump_stack, 17 dump_stack,
18 sync_client, 18 sync_client,
19 syncer::GROUP_UI, 19 syncer::GROUP_UI,
20 base::ThreadTaskRunnerHandle::Get()), 20 base::ThreadTaskRunnerHandle::Get()),
21 sync_client_(sync_client) {} 21 sync_client_(sync_client) {}
22 22
23 HistoryDeleteDirectivesDataTypeController:: 23 HistoryDeleteDirectivesDataTypeController::
24 ~HistoryDeleteDirectivesDataTypeController() { 24 ~HistoryDeleteDirectivesDataTypeController() {
25 } 25 }
26 26
27 bool HistoryDeleteDirectivesDataTypeController::ReadyForStart() const { 27 bool HistoryDeleteDirectivesDataTypeController::ReadyForStart() const {
28 DCHECK(CalledOnValidThread()); 28 DCHECK(CalledOnValidThread());
29 return !sync_client_->GetSyncService()->IsEncryptEverythingEnabled(); 29 return !sync_client_->GetSyncService()->IsEncryptEverythingEnabled();
30 } 30 }
(...skipping 29 matching lines...) Expand all
60 syncer::SyncError error( 60 syncer::SyncError error(
61 FROM_HERE, 61 FROM_HERE,
62 syncer::SyncError::DATATYPE_POLICY_ERROR, 62 syncer::SyncError::DATATYPE_POLICY_ERROR,
63 "Delete directives not supported with encryption.", 63 "Delete directives not supported with encryption.",
64 type()); 64 type());
65 CreateErrorHandler()->OnUnrecoverableError(error); 65 CreateErrorHandler()->OnUnrecoverableError(error);
66 return true; 66 return true;
67 } 67 }
68 68
69 } // namespace browser_sync 69 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698