OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_ |
6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 void UpdateItem(AppListItem* app_item); | 72 void UpdateItem(AppListItem* app_item); |
73 | 73 |
74 // Returns the existing sync item matching |id| or NULL. | 74 // Returns the existing sync item matching |id| or NULL. |
75 const SyncItem* GetSyncItem(const std::string& id) const; | 75 const SyncItem* GetSyncItem(const std::string& id) const; |
76 | 76 |
77 // Sets the name of the folder for OEM apps. | 77 // Sets the name of the folder for OEM apps. |
78 void SetOemFolderName(const std::string& name); | 78 void SetOemFolderName(const std::string& name); |
79 | 79 |
80 Profile* profile() { return profile_; } | 80 Profile* profile() { return profile_; } |
81 AppListModel* model() { return model_.get(); } | 81 AppListModel* model() { return model_.get(); } |
82 size_t GetNumSyncItemsForTest() { return sync_items_.size(); } | 82 size_t GetNumSyncItemsForTest() const { return sync_items_.size(); } |
| 83 const std::string& GetOemFolderNameForTest() const { |
| 84 return oem_folder_name_; |
| 85 } |
83 | 86 |
84 // syncer::SyncableService | 87 // syncer::SyncableService |
85 virtual syncer::SyncMergeResult MergeDataAndStartSyncing( | 88 virtual syncer::SyncMergeResult MergeDataAndStartSyncing( |
86 syncer::ModelType type, | 89 syncer::ModelType type, |
87 const syncer::SyncDataList& initial_sync_data, | 90 const syncer::SyncDataList& initial_sync_data, |
88 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, | 91 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, |
89 scoped_ptr<syncer::SyncErrorFactory> error_handler) OVERRIDE; | 92 scoped_ptr<syncer::SyncErrorFactory> error_handler) OVERRIDE; |
90 virtual void StopSyncing(syncer::ModelType type) OVERRIDE; | 93 virtual void StopSyncing(syncer::ModelType type) OVERRIDE; |
91 virtual syncer::SyncDataList GetAllSyncData( | 94 virtual syncer::SyncDataList GetAllSyncData( |
92 syncer::ModelType type) const OVERRIDE; | 95 syncer::ModelType type) const OVERRIDE; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 SyncItemMap sync_items_; | 190 SyncItemMap sync_items_; |
188 syncer::SyncableService::StartSyncFlare flare_; | 191 syncer::SyncableService::StartSyncFlare flare_; |
189 std::string oem_folder_name_; | 192 std::string oem_folder_name_; |
190 | 193 |
191 DISALLOW_COPY_AND_ASSIGN(AppListSyncableService); | 194 DISALLOW_COPY_AND_ASSIGN(AppListSyncableService); |
192 }; | 195 }; |
193 | 196 |
194 } // namespace app_list | 197 } // namespace app_list |
195 | 198 |
196 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_ | 199 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_ |
OLD | NEW |