| 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/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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 instance->SetupIfNecessary(sync_datatype_helper::test()); | 88 instance->SetupIfNecessary(sync_datatype_helper::test()); |
| 89 return instance; | 89 return instance; |
| 90 } | 90 } |
| 91 | 91 |
| 92 void SyncAppHelper::SetupIfNecessary(SyncTest* test) { | 92 void SyncAppHelper::SetupIfNecessary(SyncTest* test) { |
| 93 if (setup_completed_) | 93 if (setup_completed_) |
| 94 return; | 94 return; |
| 95 | 95 |
| 96 for (int i = 0; i < test->num_clients(); ++i) { | 96 for (int i = 0; i < test->num_clients(); ++i) { |
| 97 extensions::ExtensionSystem::Get( | 97 extensions::ExtensionSystem::Get( |
| 98 test->GetProfile(i))->InitForRegularProfile(true, false); | 98 test->GetProfile(i))->InitForRegularProfile(true); |
| 99 } | 99 } |
| 100 extensions::ExtensionSystem::Get( | 100 extensions::ExtensionSystem::Get( |
| 101 test->verifier())->InitForRegularProfile(true, false); | 101 test->verifier())->InitForRegularProfile(true); |
| 102 | 102 |
| 103 setup_completed_ = true; | 103 setup_completed_ = true; |
| 104 } | 104 } |
| 105 | 105 |
| 106 bool SyncAppHelper::AppStatesMatch(Profile* profile1, Profile* profile2) { | 106 bool SyncAppHelper::AppStatesMatch(Profile* profile1, Profile* profile2) { |
| 107 if (!SyncExtensionHelper::GetInstance()->ExtensionStatesMatch( | 107 if (!SyncExtensionHelper::GetInstance()->ExtensionStatesMatch( |
| 108 profile1, profile2)) | 108 profile1, profile2)) |
| 109 return false; | 109 return false; |
| 110 | 110 |
| 111 const AppStateMap& state_map1 = GetAppStates(profile1); | 111 const AppStateMap& state_map1 = GetAppStates(profile1); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 } | 175 } |
| 176 | 176 |
| 177 void SyncAppHelper::FixNTPOrdinalCollisions(Profile* profile) { | 177 void SyncAppHelper::FixNTPOrdinalCollisions(Profile* profile) { |
| 178 profile->GetExtensionService()->extension_prefs()->app_sorting()-> | 178 profile->GetExtensionService()->extension_prefs()->app_sorting()-> |
| 179 FixNTPOrdinalCollisions(); | 179 FixNTPOrdinalCollisions(); |
| 180 } | 180 } |
| 181 | 181 |
| 182 SyncAppHelper::SyncAppHelper() : setup_completed_(false) {} | 182 SyncAppHelper::SyncAppHelper() : setup_completed_(false) {} |
| 183 | 183 |
| 184 SyncAppHelper::~SyncAppHelper() {} | 184 SyncAppHelper::~SyncAppHelper() {} |
| OLD | NEW |