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

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

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_sync_data_type_controller.h
diff --git a/chrome/browser/ui/app_list/arc/arc_package_sync_data_type_controller.h b/chrome/browser/ui/app_list/arc/arc_package_sync_data_type_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..677f81dbf8bc999b808604ca489b99e8c3a13552
--- /dev/null
+++ b/chrome/browser/ui/app_list/arc/arc_package_sync_data_type_controller.h
@@ -0,0 +1,38 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_APP_LIST_ARC_ARC_PACKAGE_SYNC_DATA_TYPE_CONTROLLER_H_
+#define CHROME_BROWSER_UI_APP_LIST_ARC_ARC_PACKAGE_SYNC_DATA_TYPE_CONTROLLER_H_
+
+#include "base/macros.h"
+#include "components/sync_driver/data_type_controller.h"
+#include "components/sync_driver/ui_data_type_controller.h"
+
+namespace sync_driver {
+class SyncClient;
+}
+
+class Profile;
+
+// A UIDataTypeController for arc package sync datatypes, which enables or
+// disables these types based on whether ArcAppInstance is ready.
+class ArcPackageSyncDataTypeController
+ : public sync_driver::UIDataTypeController {
+ public:
+ ArcPackageSyncDataTypeController(syncer::ModelType type,
+ const base::Closure& error_callback,
+ sync_driver::SyncClient* sync_client,
+ Profile* profile);
+
+ bool ReadyForStart() const override;
+
+ private:
+ // DataTypeController is RefCounted.
+ ~ArcPackageSyncDataTypeController() override;
+
+ Profile* const profile_;
+
+ DISALLOW_COPY_AND_ASSIGN(ArcPackageSyncDataTypeController);
+};
+#endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_PACKAGE_SYNC_DATA_TYPE_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698