| 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_data_type_controller.h" | 5 #include "chrome/browser/sync/glue/extension_data_type_controller.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram_macros.h" | 7 #include "base/metrics/histogram_macros.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "extensions/browser/extension_system.h" | 9 #include "extensions/browser/extension_system.h" |
| 10 | 10 |
| 11 namespace browser_sync { | 11 namespace browser_sync { |
| 12 | 12 |
| 13 ExtensionDataTypeController::ExtensionDataTypeController( | 13 ExtensionDataTypeController::ExtensionDataTypeController( |
| 14 syncer::ModelType type, | 14 syncer::ModelType type, |
| 15 const base::Closure& dump_stack, | 15 const base::Closure& dump_stack, |
| 16 sync_driver::SyncClient* sync_client, | 16 syncer::SyncClient* sync_client, |
| 17 Profile* profile) | 17 Profile* profile) |
| 18 : UIDataTypeController(type, dump_stack, sync_client), profile_(profile) { | 18 : UIDataTypeController(type, dump_stack, sync_client), profile_(profile) { |
| 19 DCHECK(type == syncer::EXTENSIONS || type == syncer::APPS); | 19 DCHECK(type == syncer::EXTENSIONS || type == syncer::APPS); |
| 20 } | 20 } |
| 21 | 21 |
| 22 ExtensionDataTypeController::~ExtensionDataTypeController() {} | 22 ExtensionDataTypeController::~ExtensionDataTypeController() {} |
| 23 | 23 |
| 24 bool ExtensionDataTypeController::StartModels() { | 24 bool ExtensionDataTypeController::StartModels() { |
| 25 DCHECK(CalledOnValidThread()); | 25 DCHECK(CalledOnValidThread()); |
| 26 extensions::ExtensionSystem::Get(profile_)->InitForRegularProfile(true); | 26 extensions::ExtensionSystem::Get(profile_)->InitForRegularProfile(true); |
| 27 return true; | 27 return true; |
| 28 } | 28 } |
| 29 | 29 |
| 30 } // namespace browser_sync | 30 } // namespace browser_sync |
| OLD | NEW |