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

Unified Diff: components/autofill/core/browser/webdata/web_data_model_type_controller.h

Issue 2672493002: [Sync] Switch bots to run integ tests for autofill as USS. (Closed)
Patch Set: Updated for Gang's comment. 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
Index: components/autofill/core/browser/webdata/web_data_model_type_controller.h
diff --git a/components/autofill/core/browser/webdata/web_data_model_type_controller.h b/components/autofill/core/browser/webdata/web_data_model_type_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..b071d28c5562529200194a5aaf73a7db8dabe69e
--- /dev/null
+++ b/components/autofill/core/browser/webdata/web_data_model_type_controller.h
@@ -0,0 +1,49 @@
+// Copyright 2017 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 COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_WEB_DATA_MODEL_TYPE_CONTROLLER_H_
+#define COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_WEB_DATA_MODEL_TYPE_CONTROLLER_H_
+
+#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
+#include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
+#include "components/sync/driver/model_type_controller.h"
+
+namespace syncer {
+class ModelTypeSyncBridge;
+} // namespace syncer
+
+namespace autofill {
+
+class WebDataModelTypeController : public syncer::ModelTypeController {
+ public:
+ using BridgeFromWebData =
+ base::Callback<base::WeakPtr<syncer::ModelTypeSyncBridge>(
+ AutofillWebDataService*)>;
+
+ WebDataModelTypeController(
+ syncer::ModelType type,
+ syncer::SyncClient* sync_client,
+ const scoped_refptr<base::SingleThreadTaskRunner>& model_thread,
+ const scoped_refptr<AutofillWebDataService>& web_data_service,
+ const BridgeFromWebData& bridge_from_web_data);
+
+ ~WebDataModelTypeController() override;
+
+ private:
+ // syncer::ModelTypeController implementation.
+ syncer::ModelTypeController::BridgeProvider GetBridgeProvider() override;
+
+ // A reference to the AutofillWebDataService for this controller.
+ scoped_refptr<AutofillWebDataService> web_data_service_;
+
+ // How to grab the correct bridge from a web data.
+ BridgeFromWebData bridge_from_web_data_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebDataModelTypeController);
+};
+
+} // namespace autofill
+
+#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_WEB_DATA_MODEL_TYPE_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698