| 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 #include "chrome/browser/extensions/app_sync_bundle.h" | 5 #include "chrome/browser/extensions/app_sync_bundle.h" |
| 6 | 6 |
| 7 #include "base/location.h" | 7 #include "base/location.h" |
| 8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
| 9 #include "chrome/browser/extensions/extension_sorting.h" | 9 #include "chrome/browser/extensions/extension_sorting.h" |
| 10 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 else | 97 else |
| 98 AddApp(app_sync_data.id()); | 98 AddApp(app_sync_data.id()); |
| 99 extension_service_->ProcessAppSyncData(app_sync_data); | 99 extension_service_->ProcessAppSyncData(app_sync_data); |
| 100 } | 100 } |
| 101 | 101 |
| 102 void AppSyncBundle::ProcessSyncChangeList( | 102 void AppSyncBundle::ProcessSyncChangeList( |
| 103 syncer::SyncChangeList sync_change_list) { | 103 syncer::SyncChangeList sync_change_list) { |
| 104 sync_processor_->ProcessSyncChanges(FROM_HERE, sync_change_list); | 104 sync_processor_->ProcessSyncChanges(FROM_HERE, sync_change_list); |
| 105 extension_service_->extension_prefs()->extension_sorting()-> | 105 extension_service_->extension_prefs()->extension_sorting()-> |
| 106 FixNTPOrdinalCollisions(); | 106 FixNTPOrdinalCollisions(); |
| 107 extension_service_->extension_prefs()->app_list_extension_ordering()-> |
| 108 FixSyncCollisions(); |
| 107 } | 109 } |
| 108 | 110 |
| 109 bool AppSyncBundle::HasExtensionId(const std::string& id) const { | 111 bool AppSyncBundle::HasExtensionId(const std::string& id) const { |
| 110 return synced_apps_.find(id) != synced_apps_.end(); | 112 return synced_apps_.find(id) != synced_apps_.end(); |
| 111 } | 113 } |
| 112 | 114 |
| 113 bool AppSyncBundle::HasPendingExtensionId(const std::string& id) const { | 115 bool AppSyncBundle::HasPendingExtensionId(const std::string& id) const { |
| 114 return pending_sync_data_.find(id) != pending_sync_data_.end(); | 116 return pending_sync_data_.find(id) != pending_sync_data_.end(); |
| 115 } | 117 } |
| 116 | 118 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 } | 163 } |
| 162 | 164 |
| 163 | 165 |
| 164 void AppSyncBundle::MarkPendingAppSynced(const std::string& id) { | 166 void AppSyncBundle::MarkPendingAppSynced(const std::string& id) { |
| 165 pending_sync_data_.erase(id); | 167 pending_sync_data_.erase(id); |
| 166 synced_apps_.insert(id); | 168 synced_apps_.insert(id); |
| 167 } | 169 } |
| 168 | 170 |
| 169 | 171 |
| 170 } // namespace extensions | 172 } // namespace extensions |
| OLD | NEW |