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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 // Returns a map from |profile|'s installed extensions to their state. | 53 // Returns a map from |profile|'s installed extensions to their state. |
54 AppStateMap GetAppStates(Profile* profile) { | 54 AppStateMap GetAppStates(Profile* profile) { |
55 AppStateMap app_state_map; | 55 AppStateMap app_state_map; |
56 | 56 |
57 ExtensionService* extension_service = profile->GetExtensionService(); | 57 ExtensionService* extension_service = profile->GetExtensionService(); |
58 | 58 |
59 scoped_ptr<const ExtensionSet> extensions( | 59 scoped_ptr<const ExtensionSet> extensions( |
60 extension_service->GenerateInstalledExtensionsSet()); | 60 extension_service->GenerateInstalledExtensionsSet()); |
61 for (ExtensionSet::const_iterator it = extensions->begin(); | 61 for (ExtensionSet::const_iterator it = extensions->begin(); |
62 it != extensions->end(); ++it) { | 62 it != extensions->end(); ++it) { |
63 if ((*it)->GetSyncType() == Extension::SYNC_TYPE_APP) { | 63 if ((*it)->GetSyncType() == extensions::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::set<std::string> pending_crx_ids; |
73 pending_extension_manager->GetPendingIdsForUpdateCheck(&pending_crx_ids); | 73 pending_extension_manager->GetPendingIdsForUpdateCheck(&pending_crx_ids); |
(...skipping 97 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 |