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