| 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_SYNC_UTIL_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_SYNC_UTIL_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_SYNC_UTIL_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_SYNC_UTIL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 | 9 |
| 10 #include "sync/api/sync_change.h" | 10 #include "sync/api/sync_change.h" |
| 11 #include "sync/api/sync_data.h" | 11 #include "sync/api/sync_data.h" |
| 12 | 12 |
| 13 namespace base { | 13 namespace base { |
| 14 class Value; | 14 class Value; |
| 15 } // namespace base | 15 } // namespace base |
| 16 | 16 |
| 17 namespace extensions { | 17 namespace extensions { |
| 18 | 18 |
| 19 namespace settings_sync_util { | 19 namespace settings_sync_util { |
| 20 | 20 |
| 21 // Creates a SyncData object for an extension or app setting. | 21 // Creates a csync::SyncData object for an extension or app setting. |
| 22 SyncData CreateData( | 22 csync::SyncData CreateData( |
| 23 const std::string& extension_id, | 23 const std::string& extension_id, |
| 24 const std::string& key, | 24 const std::string& key, |
| 25 const base::Value& value, | 25 const base::Value& value, |
| 26 syncable::ModelType type); | 26 syncable::ModelType type); |
| 27 | 27 |
| 28 // Creates an "add" sync change for an extension or app setting. | 28 // Creates an "add" sync change for an extension or app setting. |
| 29 SyncChange CreateAdd( | 29 csync::SyncChange CreateAdd( |
| 30 const std::string& extension_id, | 30 const std::string& extension_id, |
| 31 const std::string& key, | 31 const std::string& key, |
| 32 const base::Value& value, | 32 const base::Value& value, |
| 33 syncable::ModelType type); | 33 syncable::ModelType type); |
| 34 | 34 |
| 35 // Creates an "update" sync change for an extension or app setting. | 35 // Creates an "update" sync change for an extension or app setting. |
| 36 SyncChange CreateUpdate( | 36 csync::SyncChange CreateUpdate( |
| 37 const std::string& extension_id, | 37 const std::string& extension_id, |
| 38 const std::string& key, | 38 const std::string& key, |
| 39 const base::Value& value, | 39 const base::Value& value, |
| 40 syncable::ModelType type); | 40 syncable::ModelType type); |
| 41 | 41 |
| 42 // Creates a "delete" sync change for an extension or app setting. | 42 // Creates a "delete" sync change for an extension or app setting. |
| 43 SyncChange CreateDelete( | 43 csync::SyncChange CreateDelete( |
| 44 const std::string& extension_id, | 44 const std::string& extension_id, |
| 45 const std::string& key, | 45 const std::string& key, |
| 46 syncable::ModelType type); | 46 syncable::ModelType type); |
| 47 | 47 |
| 48 } // namespace settings_sync_util | 48 } // namespace settings_sync_util |
| 49 | 49 |
| 50 } // namespace extensions | 50 } // namespace extensions |
| 51 | 51 |
| 52 #endif // CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_SYNC_UTIL_H_ | 52 #endif // CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_SYNC_UTIL_H_ |
| OLD | NEW |