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_sorting.h" | 8 #include "chrome/browser/extensions/extension_sorting.h" |
9 #include "chrome/browser/extensions/extension_system.h" | 9 #include "chrome/browser/extensions/extension_system.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.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); | 98 test->GetProfile(i))->InitForRegularProfile(true, false); |
99 } | 99 } |
100 extensions::ExtensionSystem::Get( | 100 extensions::ExtensionSystem::Get( |
101 test->verifier())->InitForRegularProfile(true); | 101 test->verifier())->InitForRegularProfile(true, false); |
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 } | 177 } |
178 | 178 |
179 void SyncAppHelper::FixNTPOrdinalCollisions(Profile* profile) { | 179 void SyncAppHelper::FixNTPOrdinalCollisions(Profile* profile) { |
180 profile->GetExtensionService()->extension_prefs()->extension_sorting()-> | 180 profile->GetExtensionService()->extension_prefs()->extension_sorting()-> |
181 FixNTPOrdinalCollisions(); | 181 FixNTPOrdinalCollisions(); |
182 } | 182 } |
183 | 183 |
184 SyncAppHelper::SyncAppHelper() : setup_completed_(false) {} | 184 SyncAppHelper::SyncAppHelper() : setup_completed_(false) {} |
185 | 185 |
186 SyncAppHelper::~SyncAppHelper() {} | 186 SyncAppHelper::~SyncAppHelper() {} |
OLD | NEW |