| 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_API_STORAGE_SETTING_SYNC_DATA_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTING_SYNC_DATA_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTING_SYNC_DATA_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTING_SYNC_DATA_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "components/sync/model/sync_change.h" | 13 #include "components/sync/model/sync_change.h" |
| 14 | 14 |
| 15 namespace syncer { | 15 namespace syncer { |
| 16 class SyncData; | 16 class SyncData; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace sync_pb { | |
| 20 class ExtensionSettingSpecifics; | |
| 21 } | |
| 22 | |
| 23 namespace extensions { | 19 namespace extensions { |
| 24 | 20 |
| 25 // Container for data interpreted from sync data/changes for an extension or | 21 // Container for data interpreted from sync data/changes for an extension or |
| 26 // app setting. Safe and efficient to copy. | 22 // app setting. Safe and efficient to copy. |
| 27 class SettingSyncData { | 23 class SettingSyncData { |
| 28 public: | 24 public: |
| 29 // Creates from a sync change. | 25 // Creates from a sync change. |
| 30 explicit SettingSyncData(const syncer::SyncChange& sync_change); | 26 explicit SettingSyncData(const syncer::SyncChange& sync_change); |
| 31 | 27 |
| 32 // Creates from sync data. |change_type| will be ACTION_INVALID. | 28 // Creates from sync data. |change_type| will be ACTION_INVALID. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 std::unique_ptr<base::Value> value_; | 61 std::unique_ptr<base::Value> value_; |
| 66 | 62 |
| 67 DISALLOW_COPY_AND_ASSIGN(SettingSyncData); | 63 DISALLOW_COPY_AND_ASSIGN(SettingSyncData); |
| 68 }; | 64 }; |
| 69 | 65 |
| 70 using SettingSyncDataList = std::vector<std::unique_ptr<SettingSyncData>>; | 66 using SettingSyncDataList = std::vector<std::unique_ptr<SettingSyncData>>; |
| 71 | 67 |
| 72 } // namespace extensions | 68 } // namespace extensions |
| 73 | 69 |
| 74 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTING_SYNC_DATA_H_ | 70 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTING_SYNC_DATA_H_ |
| OLD | NEW |