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

Side by Side Diff: chrome/browser/sync/glue/extension_setting_data_type_controller.h

Issue 7977018: Enable sync for the settings from the Extension Settings API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix race condition in ExtensionSettingsUIWrapper::Core Created 9 years, 3 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_SYNC_GLUE_EXTENSION_SETTING_DATA_TYPE_CONTROLLER_H__
6 #define CHROME_BROWSER_SYNC_GLUE_EXTENSION_SETTING_DATA_TYPE_CONTROLLER_H__
7 #pragma once
8
9 #include <string>
10
11 #include "base/compiler_specific.h"
12 #include "chrome/browser/sync/glue/non_frontend_data_type_controller.h"
13
14 class ExtensionSettings;
15 class ExtensionSettingsUIWrapper;
16 class Profile;
17 class ProfileSyncFactory;
18 class ProfileSyncService;
19
20 namespace browser_sync {
21
22 class ExtensionSettingDataTypeController
23 : public NonFrontendDataTypeController {
24 public:
25 ExtensionSettingDataTypeController(
26 ProfileSyncFactory* profile_sync_factory,
27 Profile* profile,
28 ProfileSyncService* profile_sync_service);
29 virtual ~ExtensionSettingDataTypeController();
30
31 // NonFrontendDataTypeController implementation
32 virtual syncable::ModelType type() const OVERRIDE;
33 virtual browser_sync::ModelSafeGroup model_safe_group() const OVERRIDE;
34
35 private:
36 // NonFrontendDataTypeController implementation.
37 virtual bool StartModels() OVERRIDE;
38 virtual bool StartAssociationAsync() OVERRIDE;
39 virtual void CreateSyncComponents() OVERRIDE;
40 virtual bool StopAssociationAsync() OVERRIDE;
41 virtual void RecordUnrecoverableError(
42 const tracked_objects::Location& from_here,
43 const std::string& message) OVERRIDE;
44 virtual void RecordAssociationTime(base::TimeDelta time) OVERRIDE;
45 virtual void RecordStartFailure(StartResult result) OVERRIDE;
46
47 // Starts sync association with |extension_settings|. Callback from
48 // RunWithSettings of |extension_settings_ui_wrapper_| on FILE thread.
49 void StartAssociationWithExtensionSettings(
50 ExtensionSettings* extension_settings);
51
52 // These only used on the UI thread.
53 ExtensionSettingsUIWrapper* extension_settings_ui_wrapper_;
54 ProfileSyncService* profile_sync_service_;
55
56 // Only used on the FILE thread.
57 ExtensionSettings* extension_settings_;
58
59 DISALLOW_COPY_AND_ASSIGN(ExtensionSettingDataTypeController);
60 };
61
62 } // namespace browser_sync
63
64 #endif // CHROME_BROWSER_SYNC_GLUE_EXTENSION_SETTING_DATA_TYPE_CONTROLLER_H__
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/data_type_manager_impl.cc ('k') | chrome/browser/sync/glue/extension_setting_data_type_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698