| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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_SYNC_GLUE_EXTENSION_SYNC_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_EXTENSION_SYNC_H_ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_EXTENSION_SYNC_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_EXTENSION_SYNC_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 // This file contains functions necessary for syncing | 9 // This file contains functions necessary for syncing |
| 10 // extensions-related data types. | 10 // extensions-related data types. |
| 11 | 11 |
| 12 #include <map> | 12 #include <map> |
| 13 #include <string> | 13 #include <string> |
| 14 | 14 |
| 15 class ExtensionServiceInterface; | 15 class ExtensionServiceInterface; |
| 16 class Profile; | 16 struct ExtensionSyncData; |
| 17 class ProfileSyncService; | |
| 18 | 17 |
| 19 namespace sync_api { | 18 namespace sync_api { |
| 20 struct UserShare; | 19 struct UserShare; |
| 21 } // namespace sync_api | 20 } // namespace sync_api |
| 22 | 21 |
| 23 namespace sync_pb { | 22 namespace sync_pb { |
| 24 class ExtensionSpecifics; | 23 class ExtensionSpecifics; |
| 25 } // namespace sync_pb | 24 } // namespace sync_pb |
| 26 | 25 |
| 27 namespace browser_sync { | 26 namespace browser_sync { |
| 28 | 27 |
| 29 class ExtensionData; | |
| 30 struct ExtensionSyncTraits; | 28 struct ExtensionSyncTraits; |
| 31 | 29 |
| 32 // A map from extension IDs to ExtensionData objects. | 30 // A map from extension IDs to ExtensionSyncData objects. |
| 33 typedef std::map<std::string, ExtensionData> ExtensionDataMap; | 31 typedef std::map<std::string, ExtensionSyncData> ExtensionDataMap; |
| 34 | 32 |
| 35 // Fills in |has_children| with whether or not the root node with the | 33 // Fills in |has_children| with whether or not the root node with the |
| 36 // given tag has child nodes. Returns true iff the lookup succeeded. | 34 // given tag has child nodes. Returns true iff the lookup succeeded. |
| 37 // | 35 // |
| 38 // TODO(akalin): Move this somewhere where it can be used by | 36 // TODO(akalin): Move this somewhere where it can be used by |
| 39 // other data types. | 37 // other data types. |
| 40 bool RootNodeHasChildren(const char* tag, | 38 bool RootNodeHasChildren(const char* tag, |
| 41 sync_api::UserShare* user_share, | 39 sync_api::UserShare* user_share, |
| 42 bool* has_children); | 40 bool* has_children); |
| 43 | 41 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 71 std::string* error); | 69 std::string* error); |
| 72 | 70 |
| 73 // Removes the server data for the given extension ID. | 71 // Removes the server data for the given extension ID. |
| 74 void RemoveServerData(const ExtensionSyncTraits& traits, | 72 void RemoveServerData(const ExtensionSyncTraits& traits, |
| 75 const std::string& id, | 73 const std::string& id, |
| 76 sync_api::UserShare* user_share); | 74 sync_api::UserShare* user_share); |
| 77 | 75 |
| 78 } // namespace browser_sync | 76 } // namespace browser_sync |
| 79 | 77 |
| 80 #endif // CHROME_BROWSER_SYNC_GLUE_EXTENSION_SYNC_H_ | 78 #endif // CHROME_BROWSER_SYNC_GLUE_EXTENSION_SYNC_H_ |
| OLD | NEW |