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

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

Issue 2376123003: [Sync] Move //components/sync to the syncer namespace. (Closed)
Patch Set: Rebase. Created 4 years, 2 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 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 "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( 13 HistoryDeleteDirectivesDataTypeController(const base::Closure& dump_stack,
14 const base::Closure& dump_stack, 14 syncer::SyncClient* sync_client)
15 sync_driver::SyncClient* sync_client) 15 : syncer::UIDataTypeController(syncer::HISTORY_DELETE_DIRECTIVES,
16 : sync_driver::UIDataTypeController(syncer::HISTORY_DELETE_DIRECTIVES, 16 dump_stack,
17 dump_stack, 17 sync_client),
18 sync_client),
19 sync_client_(sync_client) {} 18 sync_client_(sync_client) {}
20 19
21 HistoryDeleteDirectivesDataTypeController:: 20 HistoryDeleteDirectivesDataTypeController::
22 ~HistoryDeleteDirectivesDataTypeController() { 21 ~HistoryDeleteDirectivesDataTypeController() {
23 } 22 }
24 23
25 bool HistoryDeleteDirectivesDataTypeController::ReadyForStart() const { 24 bool HistoryDeleteDirectivesDataTypeController::ReadyForStart() const {
26 DCHECK(CalledOnValidThread()); 25 DCHECK(CalledOnValidThread());
27 return !sync_client_->GetSyncService()->IsEncryptEverythingEnabled(); 26 return !sync_client_->GetSyncService()->IsEncryptEverythingEnabled();
28 } 27 }
(...skipping 29 matching lines...) Expand all
58 syncer::SyncError error( 57 syncer::SyncError error(
59 FROM_HERE, 58 FROM_HERE,
60 syncer::SyncError::DATATYPE_POLICY_ERROR, 59 syncer::SyncError::DATATYPE_POLICY_ERROR,
61 "Delete directives not supported with encryption.", 60 "Delete directives not supported with encryption.",
62 type()); 61 type());
63 CreateErrorHandler()->OnUnrecoverableError(error); 62 CreateErrorHandler()->OnUnrecoverableError(error);
64 return true; 63 return true;
65 } 64 }
66 65
67 } // namespace browser_sync 66 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698