| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_arc_package_helper.h" | 5 #include "chrome/browser/sync/test/integration/sync_arc_package_helper.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 DCHECK(profile); | 146 DCHECK(profile); |
| 147 const user_manager::User* user = CreateUserAndLogin(profile, id); | 147 const user_manager::User* user = CreateUserAndLogin(profile, id); |
| 148 // Have the user-to-profile mapping ready to avoid using the real profile | 148 // Have the user-to-profile mapping ready to avoid using the real profile |
| 149 // manager (which is null). | 149 // manager (which is null). |
| 150 chromeos::ProfileHelper::Get()->SetUserToProfileMappingForTesting(user, | 150 chromeos::ProfileHelper::Get()->SetUserToProfileMappingForTesting(user, |
| 151 profile); | 151 profile); |
| 152 | 152 |
| 153 ArcSessionManager* arc_session_manager = ArcSessionManager::Get(); | 153 ArcSessionManager* arc_session_manager = ArcSessionManager::Get(); |
| 154 DCHECK(arc_session_manager); | 154 DCHECK(arc_session_manager); |
| 155 ArcSessionManager::DisableUIForTesting(); | 155 ArcSessionManager::DisableUIForTesting(); |
| 156 arc_session_manager->OnPrimaryUserProfilePrepared(profile); | 156 arc_session_manager->SetProfile(profile); |
| 157 arc_session_manager->StartPreferenceHandler(); |
| 157 arc::SetArcPlayStoreEnabledForProfile(profile, true); | 158 arc::SetArcPlayStoreEnabledForProfile(profile, true); |
| 158 | 159 |
| 159 ArcAppListPrefs* arc_app_list_prefs = ArcAppListPrefs::Get(profile); | 160 ArcAppListPrefs* arc_app_list_prefs = ArcAppListPrefs::Get(profile); |
| 160 DCHECK(arc_app_list_prefs); | 161 DCHECK(arc_app_list_prefs); |
| 161 | 162 |
| 162 base::RunLoop run_loop; | 163 base::RunLoop run_loop; |
| 163 arc_app_list_prefs->SetDefaltAppsReadyCallback(run_loop.QuitClosure()); | 164 arc_app_list_prefs->SetDefaltAppsReadyCallback(run_loop.QuitClosure()); |
| 164 run_loop.Run(); | 165 run_loop.Run(); |
| 165 | 166 |
| 166 instance_map_[profile] = | 167 instance_map_[profile] = |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 if (package1_info->last_backup_android_id != | 246 if (package1_info->last_backup_android_id != |
| 246 package2_info->last_backup_android_id) | 247 package2_info->last_backup_android_id) |
| 247 return false; | 248 return false; |
| 248 if (package1_info->last_backup_time != package2_info->last_backup_time) | 249 if (package1_info->last_backup_time != package2_info->last_backup_time) |
| 249 return false; | 250 return false; |
| 250 } | 251 } |
| 251 return true; | 252 return true; |
| 252 } | 253 } |
| 253 | 254 |
| 254 } // namespace arc | 255 } // namespace arc |
| OLD | NEW |