Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8026)

Unified Diff: chrome/browser/ui/app_list/arc/arc_package_sync_data_type_controller.cc

Issue 2711033002: Fix Arc integration test. (Closed)
Patch Set: Pure rebase. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_app_list_prefs_factory.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/arc/arc_package_sync_data_type_controller.cc
diff --git a/chrome/browser/ui/app_list/arc/arc_package_sync_data_type_controller.cc b/chrome/browser/ui/app_list/arc/arc_package_sync_data_type_controller.cc
index 293b5d6947c0ca2a2460d02ada3754f3128a11a3..864c884b6477073170e4b5002b745a94305e09d3 100644
--- a/chrome/browser/ui/app_list/arc/arc_package_sync_data_type_controller.cc
+++ b/chrome/browser/ui/app_list/arc/arc_package_sync_data_type_controller.cc
@@ -7,6 +7,7 @@
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/chromeos/arc/arc_util.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs_factory.h"
#include "chrome/common/pref_names.h"
#include "components/prefs/pref_service.h"
#include "components/sync/base/pref_names.h"
@@ -14,18 +15,6 @@
#include "components/sync/driver/sync_client.h"
#include "components/sync/driver/sync_service.h"
-// ArcPackage sync service is controlled by apps checkbox in sync settings. ARC
-// apps and regular Chrome apps have same user control.
-namespace {
-
-// Indicates whether ARC is enabled on this machine.
-bool IsArcEnabled(Profile* profile) {
- return arc::IsArcAllowedForProfile(profile) &&
- profile->GetPrefs()->GetBoolean(prefs::kArcEnabled);
-}
-
-} // namespace
-
ArcPackageSyncDataTypeController::ArcPackageSyncDataTypeController(
syncer::ModelType type,
const base::Closure& dump_stack,
@@ -49,7 +38,9 @@ ArcPackageSyncDataTypeController::~ArcPackageSyncDataTypeController() {
bool ArcPackageSyncDataTypeController::ReadyForStart() const {
DCHECK(CalledOnValidThread());
- return IsArcEnabled(profile_) && ShouldSyncArc();
+ // In sync integration test, always consider the DTC as ready for start.
+ return ArcAppListPrefsFactory::IsFactorySetForSyncTest() ||
+ (arc::IsArcPlayStoreEnabledForProfile(profile_) && ShouldSyncArc());
}
bool ArcPackageSyncDataTypeController::StartModels() {
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_app_list_prefs_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698