| 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/launch_util.h" | 8 #include "chrome/browser/extensions/launch_util.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/sync/test/integration/extensions_helper.h" | 10 #include "chrome/browser/sync/test/integration/extensions_helper.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 id != pending_crx_ids.end(); ++id) { | 109 id != pending_crx_ids.end(); ++id) { |
| 110 LoadApp(profile, *id, &(app_state_map[*id])); | 110 LoadApp(profile, *id, &(app_state_map[*id])); |
| 111 } | 111 } |
| 112 | 112 |
| 113 return app_state_map; | 113 return app_state_map; |
| 114 } | 114 } |
| 115 | 115 |
| 116 } // namespace | 116 } // namespace |
| 117 | 117 |
| 118 SyncAppHelper* SyncAppHelper::GetInstance() { | 118 SyncAppHelper* SyncAppHelper::GetInstance() { |
| 119 SyncAppHelper* instance = Singleton<SyncAppHelper>::get(); | 119 SyncAppHelper* instance = base::Singleton<SyncAppHelper>::get(); |
| 120 instance->SetupIfNecessary(sync_datatype_helper::test()); | 120 instance->SetupIfNecessary(sync_datatype_helper::test()); |
| 121 return instance; | 121 return instance; |
| 122 } | 122 } |
| 123 | 123 |
| 124 void SyncAppHelper::SetupIfNecessary(SyncTest* test) { | 124 void SyncAppHelper::SetupIfNecessary(SyncTest* test) { |
| 125 if (setup_completed_) | 125 if (setup_completed_) |
| 126 return; | 126 return; |
| 127 | 127 |
| 128 for (int i = 0; i < test->num_clients(); ++i) { | 128 for (int i = 0; i < test->num_clients(); ++i) { |
| 129 extensions::ExtensionSystem::Get( | 129 extensions::ExtensionSystem::Get( |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 crx_file::id_util::GenerateId(name), app_launch_ordinal); | 211 crx_file::id_util::GenerateId(name), app_launch_ordinal); |
| 212 } | 212 } |
| 213 | 213 |
| 214 void SyncAppHelper::FixNTPOrdinalCollisions(Profile* profile) { | 214 void SyncAppHelper::FixNTPOrdinalCollisions(Profile* profile) { |
| 215 ExtensionPrefs::Get(profile)->app_sorting()->FixNTPOrdinalCollisions(); | 215 ExtensionPrefs::Get(profile)->app_sorting()->FixNTPOrdinalCollisions(); |
| 216 } | 216 } |
| 217 | 217 |
| 218 SyncAppHelper::SyncAppHelper() : setup_completed_(false) {} | 218 SyncAppHelper::SyncAppHelper() : setup_completed_(false) {} |
| 219 | 219 |
| 220 SyncAppHelper::~SyncAppHelper() {} | 220 SyncAppHelper::~SyncAppHelper() {} |
| OLD | NEW |