| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 Profile* profile); | 42 Profile* profile); |
| 43 | 43 |
| 44 virtual ~SettingsFrontend(); | 44 virtual ~SettingsFrontend(); |
| 45 | 45 |
| 46 typedef base::Callback<void(syncer::SyncableService*)> | 46 typedef base::Callback<void(syncer::SyncableService*)> |
| 47 SyncableServiceCallback; | 47 SyncableServiceCallback; |
| 48 typedef base::Callback<void(ValueStore*)> StorageCallback; | 48 typedef base::Callback<void(ValueStore*)> StorageCallback; |
| 49 | 49 |
| 50 // Must only be called from the FILE thread. |type| should be either | 50 // Must only be called from the FILE thread. |type| should be either |
| 51 // APP_SETTINGS or EXTENSION_SETTINGS. | 51 // APP_SETTINGS or EXTENSION_SETTINGS. |
| 52 syncer::SyncableService* GetBackendForSync(syncable::ModelType type) const; | 52 syncer::SyncableService* GetBackendForSync(syncer::ModelType type) const; |
| 53 | 53 |
| 54 // Runs |callback| on the FILE thread with the storage area for | 54 // Runs |callback| on the FILE thread with the storage area for |
| 55 // |extension_id|. If there is no extension with that ID, the storage area | 55 // |extension_id|. If there is no extension with that ID, the storage area |
| 56 // will be NULL. | 56 // will be NULL. |
| 57 void RunWithStorage( | 57 void RunWithStorage( |
| 58 const std::string& extension_id, | 58 const std::string& extension_id, |
| 59 settings_namespace::Namespace settings_namespace, | 59 settings_namespace::Namespace settings_namespace, |
| 60 const StorageCallback& callback); | 60 const StorageCallback& callback); |
| 61 | 61 |
| 62 // Deletes the settings for an extension (on the FILE thread). | 62 // Deletes the settings for an extension (on the FILE thread). |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 scoped_refptr<BackendWrapper> extension; | 97 scoped_refptr<BackendWrapper> extension; |
| 98 }; | 98 }; |
| 99 std::map<settings_namespace::Namespace, BackendWrappers> backends_; | 99 std::map<settings_namespace::Namespace, BackendWrappers> backends_; |
| 100 | 100 |
| 101 DISALLOW_COPY_AND_ASSIGN(SettingsFrontend); | 101 DISALLOW_COPY_AND_ASSIGN(SettingsFrontend); |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 } // namespace extensions | 104 } // namespace extensions |
| 105 | 105 |
| 106 #endif // CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_FRONTEND_H_ | 106 #endif // CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_FRONTEND_H_ |
| OLD | NEW |