| 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 #ifndef CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_FRONTEND_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_FRONTEND_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_FRONTEND_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_FRONTEND_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 // Creates with a specific factory |storage_factory| (presumably for tests). | 37 // Creates with a specific factory |storage_factory| (presumably for tests). |
| 38 // Ownership of |profile| not taken. | 38 // Ownership of |profile| not taken. |
| 39 static SettingsFrontend* Create( | 39 static SettingsFrontend* Create( |
| 40 const scoped_refptr<SettingsStorageFactory>& storage_factory, | 40 const scoped_refptr<SettingsStorageFactory>& storage_factory, |
| 41 // Owership NOT taken. | 41 // Owership NOT taken. |
| 42 Profile* profile); | 42 Profile* profile); |
| 43 | 43 |
| 44 virtual ~SettingsFrontend(); | 44 virtual ~SettingsFrontend(); |
| 45 | 45 |
| 46 typedef base::Callback<void(SyncableService*)> SyncableServiceCallback; | 46 typedef base::Callback<void(csync::SyncableService*)> SyncableServiceCallback; |
| 47 typedef base::Callback<void(ValueStore*)> StorageCallback; | 47 typedef base::Callback<void(ValueStore*)> StorageCallback; |
| 48 | 48 |
| 49 // Must only be called from the FILE thread. |type| should be either | 49 // Must only be called from the FILE thread. |type| should be either |
| 50 // APP_SETTINGS or EXTENSION_SETTINGS. | 50 // APP_SETTINGS or EXTENSION_SETTINGS. |
| 51 SyncableService* GetBackendForSync(syncable::ModelType type) const; | 51 csync::SyncableService* GetBackendForSync(syncable::ModelType type) const; |
| 52 | 52 |
| 53 // Runs |callback| on the FILE thread with the storage area for | 53 // Runs |callback| on the FILE thread with the storage area for |
| 54 // |extension_id|. If there is no extension with that ID, the storage area | 54 // |extension_id|. If there is no extension with that ID, the storage area |
| 55 // will be NULL. | 55 // will be NULL. |
| 56 void RunWithStorage( | 56 void RunWithStorage( |
| 57 const std::string& extension_id, | 57 const std::string& extension_id, |
| 58 settings_namespace::Namespace settings_namespace, | 58 settings_namespace::Namespace settings_namespace, |
| 59 const StorageCallback& callback); | 59 const StorageCallback& callback); |
| 60 | 60 |
| 61 // Deletes the settings for an extension (on the FILE thread). | 61 // Deletes the settings for an extension (on the FILE thread). |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 scoped_refptr<BackendWrapper> extension; | 96 scoped_refptr<BackendWrapper> extension; |
| 97 }; | 97 }; |
| 98 std::map<settings_namespace::Namespace, BackendWrappers> backends_; | 98 std::map<settings_namespace::Namespace, BackendWrappers> backends_; |
| 99 | 99 |
| 100 DISALLOW_COPY_AND_ASSIGN(SettingsFrontend); | 100 DISALLOW_COPY_AND_ASSIGN(SettingsFrontend); |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 } // namespace extensions | 103 } // namespace extensions |
| 104 | 104 |
| 105 #endif // CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_FRONTEND_H_ | 105 #endif // CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_FRONTEND_H_ |
| OLD | NEW |