OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/sync/glue/extension_setting_data_type_controller.h" | 5 #include "chrome/browser/sync/glue/extension_setting_data_type_controller.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/metrics/histogram_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
11 #include "components/sync/driver/generic_change_processor.h" | 11 #include "components/sync/driver/generic_change_processor.h" |
12 #include "components/sync/model/syncable_service.h" | 12 #include "components/sync/model/syncable_service.h" |
13 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
14 #include "extensions/browser/extension_system.h" | 14 #include "extensions/browser/extension_system.h" |
15 | 15 |
16 using content::BrowserThread; | 16 using content::BrowserThread; |
17 | 17 |
18 namespace browser_sync { | 18 namespace browser_sync { |
19 | 19 |
20 ExtensionSettingDataTypeController::ExtensionSettingDataTypeController( | 20 ExtensionSettingDataTypeController::ExtensionSettingDataTypeController( |
21 syncer::ModelType type, | 21 syncer::ModelType type, |
22 const base::Closure& dump_stack, | 22 const base::Closure& dump_stack, |
23 syncer::SyncClient* sync_client, | 23 syncer::SyncClient* sync_client, |
24 Profile* profile) | 24 Profile* profile) |
25 : NonUIDataTypeController( | 25 : AsyncDirectoryTypeController( |
26 type, | 26 type, |
27 dump_stack, | 27 dump_stack, |
28 sync_client, | 28 sync_client, |
29 syncer::GROUP_FILE, | 29 syncer::GROUP_FILE, |
30 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)), | 30 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)), |
31 profile_(profile) { | 31 profile_(profile) { |
32 DCHECK(type == syncer::EXTENSION_SETTINGS || type == syncer::APP_SETTINGS); | 32 DCHECK(type == syncer::EXTENSION_SETTINGS || type == syncer::APP_SETTINGS); |
33 } | 33 } |
34 | 34 |
35 ExtensionSettingDataTypeController::~ExtensionSettingDataTypeController() {} | 35 ExtensionSettingDataTypeController::~ExtensionSettingDataTypeController() {} |
36 | 36 |
37 bool ExtensionSettingDataTypeController::StartModels() { | 37 bool ExtensionSettingDataTypeController::StartModels() { |
38 DCHECK(CalledOnValidThread()); | 38 DCHECK(CalledOnValidThread()); |
39 extensions::ExtensionSystem::Get(profile_)->InitForRegularProfile(true); | 39 extensions::ExtensionSystem::Get(profile_)->InitForRegularProfile(true); |
40 return true; | 40 return true; |
41 } | 41 } |
42 | 42 |
43 } // namespace browser_sync | 43 } // namespace browser_sync |
OLD | NEW |