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

Side by Side Diff: chrome/browser/sync/glue/extension_setting_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 (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/api/syncable_service.h" 11 #include "components/sync/api/syncable_service.h"
12 #include "components/sync/driver/generic_change_processor.h" 12 #include "components/sync/driver/generic_change_processor.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 sync_driver::SyncClient* sync_client, 23 syncer::SyncClient* sync_client,
24 Profile* profile) 24 Profile* profile)
25 : NonUIDataTypeController(type, dump_stack, sync_client), 25 : NonUIDataTypeController(type, dump_stack, sync_client),
26 profile_(profile) { 26 profile_(profile) {
27 DCHECK(type == syncer::EXTENSION_SETTINGS || type == syncer::APP_SETTINGS); 27 DCHECK(type == syncer::EXTENSION_SETTINGS || type == syncer::APP_SETTINGS);
28 } 28 }
29 29
30 syncer::ModelSafeGroup 30 syncer::ModelSafeGroup
31 ExtensionSettingDataTypeController::model_safe_group() const { 31 ExtensionSettingDataTypeController::model_safe_group() const {
32 return syncer::GROUP_FILE; 32 return syncer::GROUP_FILE;
33 } 33 }
34 34
35 ExtensionSettingDataTypeController::~ExtensionSettingDataTypeController() {} 35 ExtensionSettingDataTypeController::~ExtensionSettingDataTypeController() {}
36 36
37 bool ExtensionSettingDataTypeController::PostTaskOnBackendThread( 37 bool ExtensionSettingDataTypeController::PostTaskOnBackendThread(
38 const tracked_objects::Location& from_here, 38 const tracked_objects::Location& from_here,
39 const base::Closure& task) { 39 const base::Closure& task) {
40 DCHECK(CalledOnValidThread()); 40 DCHECK(CalledOnValidThread());
41 return BrowserThread::PostTask(BrowserThread::FILE, from_here, task); 41 return BrowserThread::PostTask(BrowserThread::FILE, from_here, task);
42 } 42 }
43 43
44 bool ExtensionSettingDataTypeController::StartModels() { 44 bool ExtensionSettingDataTypeController::StartModels() {
45 DCHECK(CalledOnValidThread()); 45 DCHECK(CalledOnValidThread());
46 extensions::ExtensionSystem::Get(profile_)->InitForRegularProfile(true); 46 extensions::ExtensionSystem::Get(profile_)->InitForRegularProfile(true);
47 return true; 47 return true;
48 } 48 }
49 49
50 } // namespace browser_sync 50 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698