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

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

Issue 2250753002: arc: Fix ArcPackageSyncableService initialization issue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 4 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
Index: chrome/browser/ui/app_list/arc/arc_package_syncable_service.cc
diff --git a/chrome/browser/ui/app_list/arc/arc_package_syncable_service.cc b/chrome/browser/ui/app_list/arc/arc_package_syncable_service.cc
index 6e509800e8b3e84180774f4b81e7311f4ca18144..f9d35acdd3dbf7957f267ad9522441afdb6a2a48 100644
--- a/chrome/browser/ui/app_list/arc/arc_package_syncable_service.cc
+++ b/chrome/browser/ui/app_list/arc/arc_package_syncable_service.cc
@@ -7,10 +7,12 @@
#include <unordered_set>
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
#include "chrome/browser/ui/app_list/arc/arc_package_syncable_service_factory.h"
#include "chrome/common/pref_names.h"
#include "components/prefs/scoped_user_pref_update.h"
+#include "components/sync_driver/sync_service.h"
#include "sync/api/sync_change_processor.h"
#include "sync/api/sync_data.h"
#include "sync/api/sync_merge_result.h"
@@ -167,6 +169,7 @@ void ArcPackageSyncableService::StopSyncing(syncer::ModelType type) {
sync_processor_.reset();
sync_error_handler_.reset();
+ flare_.Reset();
sync_items_.clear();
pending_install_items_.clear();
@@ -217,6 +220,12 @@ syncer::SyncError ArcPackageSyncableService::ProcessSyncChanges(
bool ArcPackageSyncableService::SyncStarted() {
if (sync_processor_.get())
return true;
+
+ sync_driver::SyncService* sync_service =
+ ProfileSyncServiceFactory::GetSyncServiceForBrowserContext(profile_);
+ if (sync_service)
+ sync_service->ReenableDatatype(syncer::ARC_PACKAGE);
+
if (flare_.is_null()) {
VLOG(2) << this << ": SyncStarted: Flare.";
flare_ = sync_start_util::GetFlareForSyncableService(profile_->GetPath());
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_package_sync_data_type_controller.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698