| 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_EXTENSION_SYNC_DATA_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_DATA_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_DATA_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_DATA_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <string> | 9 #include <string> |
| 9 | 10 |
| 10 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "base/version.h" | 12 #include "base/version.h" |
| 13 #include "extensions/common/constants.h" | 13 #include "extensions/common/constants.h" |
| 14 #include "sync/api/string_ordinal.h" | 14 #include "sync/api/string_ordinal.h" |
| 15 #include "sync/api/sync_change.h" | 15 #include "sync/api/sync_change.h" |
| 16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
| 17 | 17 |
| 18 namespace syncer { | 18 namespace syncer { |
| 19 class SyncData; | 19 class SyncData; |
| 20 } | 20 } |
| 21 | 21 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 bool remote_install, | 62 bool remote_install, |
| 63 OptionalBoolean all_urls_enabled, | 63 OptionalBoolean all_urls_enabled, |
| 64 const syncer::StringOrdinal& app_launch_ordinal, | 64 const syncer::StringOrdinal& app_launch_ordinal, |
| 65 const syncer::StringOrdinal& page_ordinal, | 65 const syncer::StringOrdinal& page_ordinal, |
| 66 extensions::LaunchType launch_type); | 66 extensions::LaunchType launch_type); |
| 67 ExtensionSyncData(const ExtensionSyncData& other); | 67 ExtensionSyncData(const ExtensionSyncData& other); |
| 68 ~ExtensionSyncData(); | 68 ~ExtensionSyncData(); |
| 69 | 69 |
| 70 // For constructing an ExtensionSyncData from received sync data. | 70 // For constructing an ExtensionSyncData from received sync data. |
| 71 // May return null if the sync data was invalid. | 71 // May return null if the sync data was invalid. |
| 72 static scoped_ptr<ExtensionSyncData> CreateFromSyncData( | 72 static std::unique_ptr<ExtensionSyncData> CreateFromSyncData( |
| 73 const syncer::SyncData& sync_data); | 73 const syncer::SyncData& sync_data); |
| 74 static scoped_ptr<ExtensionSyncData> CreateFromSyncChange( | 74 static std::unique_ptr<ExtensionSyncData> CreateFromSyncChange( |
| 75 const syncer::SyncChange& sync_change); | 75 const syncer::SyncChange& sync_change); |
| 76 | 76 |
| 77 // Retrieve sync data from this class. | 77 // Retrieve sync data from this class. |
| 78 syncer::SyncData GetSyncData() const; | 78 syncer::SyncData GetSyncData() const; |
| 79 syncer::SyncChange GetSyncChange( | 79 syncer::SyncChange GetSyncChange( |
| 80 syncer::SyncChange::SyncChangeType change_type) const; | 80 syncer::SyncChange::SyncChangeType change_type) const; |
| 81 | 81 |
| 82 bool is_app() const { return is_app_; } | 82 bool is_app() const { return is_app_; } |
| 83 | 83 |
| 84 const std::string& id() const { return id_; } | 84 const std::string& id() const { return id_; } |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 extensions::LaunchType launch_type_; | 166 extensions::LaunchType launch_type_; |
| 167 std::string bookmark_app_url_; | 167 std::string bookmark_app_url_; |
| 168 std::string bookmark_app_description_; | 168 std::string bookmark_app_description_; |
| 169 std::string bookmark_app_icon_color_; | 169 std::string bookmark_app_icon_color_; |
| 170 std::vector<LinkedAppIconInfo> linked_icons_; | 170 std::vector<LinkedAppIconInfo> linked_icons_; |
| 171 }; | 171 }; |
| 172 | 172 |
| 173 } // namespace extensions | 173 } // namespace extensions |
| 174 | 174 |
| 175 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_DATA_H_ | 175 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_DATA_H_ |
| OLD | NEW |