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

Side by Side Diff: chrome/browser/supervised_user/supervised_user_sync_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 "chrome/browser/supervised_user/supervised_user_sync_data_type_controll er.h" 5 #include "chrome/browser/supervised_user/supervised_user_sync_data_type_controll er.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 8
9 SupervisedUserSyncDataTypeController::SupervisedUserSyncDataTypeController( 9 SupervisedUserSyncDataTypeController::SupervisedUserSyncDataTypeController(
10 syncer::ModelType type, 10 syncer::ModelType type,
11 const base::Closure& dump_stack, 11 const base::Closure& dump_stack,
12 sync_driver::SyncClient* sync_client, 12 syncer::SyncClient* sync_client,
13 Profile* profile) 13 Profile* profile)
14 : sync_driver::UIDataTypeController(type, dump_stack, sync_client), 14 : syncer::UIDataTypeController(type, dump_stack, sync_client),
15 profile_(profile) { 15 profile_(profile) {
16 DCHECK(type == syncer::SUPERVISED_USERS || 16 DCHECK(type == syncer::SUPERVISED_USERS ||
17 type == syncer::SUPERVISED_USER_SETTINGS || 17 type == syncer::SUPERVISED_USER_SETTINGS ||
18 type == syncer::SUPERVISED_USER_SHARED_SETTINGS || 18 type == syncer::SUPERVISED_USER_SHARED_SETTINGS ||
19 type == syncer::SUPERVISED_USER_WHITELISTS); 19 type == syncer::SUPERVISED_USER_WHITELISTS);
20 } 20 }
21 21
22 SupervisedUserSyncDataTypeController::~SupervisedUserSyncDataTypeController() {} 22 SupervisedUserSyncDataTypeController::~SupervisedUserSyncDataTypeController() {}
23 23
24 bool SupervisedUserSyncDataTypeController::ReadyForStart() const { 24 bool SupervisedUserSyncDataTypeController::ReadyForStart() const {
25 DCHECK(CalledOnValidThread()); 25 DCHECK(CalledOnValidThread());
26 switch (type()) { 26 switch (type()) {
27 case syncer::SUPERVISED_USERS: 27 case syncer::SUPERVISED_USERS:
28 return !profile_->IsSupervised(); 28 return !profile_->IsSupervised();
29 case syncer::SUPERVISED_USER_SETTINGS: 29 case syncer::SUPERVISED_USER_SETTINGS:
30 case syncer::SUPERVISED_USER_WHITELISTS: 30 case syncer::SUPERVISED_USER_WHITELISTS:
31 return profile_->IsSupervised(); 31 return profile_->IsSupervised();
32 case syncer::SUPERVISED_USER_SHARED_SETTINGS: 32 case syncer::SUPERVISED_USER_SHARED_SETTINGS:
33 return !profile_->IsChild(); 33 return !profile_->IsChild();
34 default: 34 default:
35 NOTREACHED(); 35 NOTREACHED();
36 } 36 }
37 return false; 37 return false;
38 } 38 }
OLDNEW
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_sync_data_type_controller.h ('k') | chrome/browser/sync/chrome_sync_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698