| 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 #include "chrome/browser/extensions/extension_sync_service.h" | 5 #include "chrome/browser/extensions/extension_sync_service.h" | 
| 6 | 6 | 
| 7 #include <utility> | 7 #include <utility> | 
| 8 | 8 | 
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" | 
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" | 
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 171   } | 171   } | 
| 172 } | 172 } | 
| 173 | 173 | 
| 174 bool ExtensionSyncService::HasPendingReenable( | 174 bool ExtensionSyncService::HasPendingReenable( | 
| 175     const std::string& id, | 175     const std::string& id, | 
| 176     const base::Version& version) const { | 176     const base::Version& version) const { | 
| 177   auto it = pending_updates_.find(id); | 177   auto it = pending_updates_.find(id); | 
| 178   if (it == pending_updates_.end()) | 178   if (it == pending_updates_.end()) | 
| 179     return false; | 179     return false; | 
| 180   const PendingUpdate& pending = it->second; | 180   const PendingUpdate& pending = it->second; | 
| 181   return pending.version.Equals(version) && | 181   return pending.version == version && | 
| 182          pending.grant_permissions_and_reenable; | 182          pending.grant_permissions_and_reenable; | 
| 183 } | 183 } | 
| 184 | 184 | 
| 185 syncer::SyncMergeResult ExtensionSyncService::MergeDataAndStartSyncing( | 185 syncer::SyncMergeResult ExtensionSyncService::MergeDataAndStartSyncing( | 
| 186     syncer::ModelType type, | 186     syncer::ModelType type, | 
| 187     const syncer::SyncDataList& initial_sync_data, | 187     const syncer::SyncDataList& initial_sync_data, | 
| 188     scoped_ptr<syncer::SyncChangeProcessor> sync_processor, | 188     scoped_ptr<syncer::SyncChangeProcessor> sync_processor, | 
| 189     scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) { | 189     scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) { | 
| 190   CHECK(sync_processor.get()); | 190   CHECK(sync_processor.get()); | 
| 191   LOG_IF(FATAL, type != syncer::EXTENSIONS && type != syncer::APPS) | 191   LOG_IF(FATAL, type != syncer::EXTENSIONS && type != syncer::APPS) | 
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 710       sync_data_list->push_back(CreateSyncData(*extension)); | 710       sync_data_list->push_back(CreateSyncData(*extension)); | 
| 711     } | 711     } | 
| 712   } | 712   } | 
| 713 } | 713 } | 
| 714 | 714 | 
| 715 bool ExtensionSyncService::ShouldSync(const Extension& extension) const { | 715 bool ExtensionSyncService::ShouldSync(const Extension& extension) const { | 
| 716   // Themes are handled by the ThemeSyncableService. | 716   // Themes are handled by the ThemeSyncableService. | 
| 717   return extensions::util::ShouldSync(&extension, profile_) && | 717   return extensions::util::ShouldSync(&extension, profile_) && | 
| 718          !extension.is_theme(); | 718          !extension.is_theme(); | 
| 719 } | 719 } | 
| OLD | NEW | 
|---|