| 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/sync/test/integration/sync_app_helper.h" | 5 #include "chrome/browser/sync/test/integration/sync_app_helper.h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/extension_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
| 8 #include "chrome/browser/extensions/extension_system.h" | 8 #include "chrome/browser/extensions/extension_system.h" |
| 9 #include "chrome/browser/extensions/extension_sorting.h" | 9 #include "chrome/browser/extensions/extension_sorting.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 it != extensions->end(); ++it) { | 62 it != extensions->end(); ++it) { |
| 63 if ((*it)->GetSyncType() == Extension::SYNC_TYPE_APP) { | 63 if ((*it)->GetSyncType() == Extension::SYNC_TYPE_APP) { |
| 64 const std::string& id = (*it)->id(); | 64 const std::string& id = (*it)->id(); |
| 65 LoadApp(extension_service, id, &(app_state_map[id])); | 65 LoadApp(extension_service, id, &(app_state_map[id])); |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 | 68 |
| 69 const PendingExtensionManager* pending_extension_manager = | 69 const PendingExtensionManager* pending_extension_manager = |
| 70 extension_service->pending_extension_manager(); | 70 extension_service->pending_extension_manager(); |
| 71 | 71 |
| 72 std::set<std::string> pending_crx_ids; | 72 std::list<std::string> pending_crx_ids; |
| 73 pending_extension_manager->GetPendingIdsForUpdateCheck(&pending_crx_ids); | 73 pending_extension_manager->GetPendingIdsForUpdateCheck(&pending_crx_ids); |
| 74 | 74 |
| 75 for (std::set<std::string>::const_iterator id = pending_crx_ids.begin(); | 75 for (std::list<std::string>::const_iterator id = pending_crx_ids.begin(); |
| 76 id != pending_crx_ids.end(); ++id) { | 76 id != pending_crx_ids.end(); ++id) { |
| 77 LoadApp(extension_service, *id, &(app_state_map[*id])); | 77 LoadApp(extension_service, *id, &(app_state_map[*id])); |
| 78 } | 78 } |
| 79 | 79 |
| 80 return app_state_map; | 80 return app_state_map; |
| 81 } | 81 } |
| 82 | 82 |
| 83 } // namespace | 83 } // namespace |
| 84 | 84 |
| 85 SyncAppHelper* SyncAppHelper::GetInstance() { | 85 SyncAppHelper* SyncAppHelper::GetInstance() { |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 } | 171 } |
| 172 | 172 |
| 173 void SyncAppHelper::FixNTPOrdinalCollisions(Profile* profile) { | 173 void SyncAppHelper::FixNTPOrdinalCollisions(Profile* profile) { |
| 174 profile->GetExtensionService()->extension_prefs()->extension_sorting()-> | 174 profile->GetExtensionService()->extension_prefs()->extension_sorting()-> |
| 175 FixNTPOrdinalCollisions(); | 175 FixNTPOrdinalCollisions(); |
| 176 } | 176 } |
| 177 | 177 |
| 178 SyncAppHelper::SyncAppHelper() : setup_completed_(false) {} | 178 SyncAppHelper::SyncAppHelper() : setup_completed_(false) {} |
| 179 | 179 |
| 180 SyncAppHelper::~SyncAppHelper() {} | 180 SyncAppHelper::~SyncAppHelper() {} |
| OLD | NEW |