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

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

Powered by Google App Engine
This is Rietveld 408576698