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

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

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.cc
diff --git a/components/autofill/core/browser/webdata/web_data_model_type_controller.cc b/components/autofill/core/browser/webdata/web_data_model_type_controller.cc
new file mode 100644
index 0000000000000000000000000000000000000000..aa2eb36397dfa413f339852c81cb224eda2e285f
--- /dev/null
+++ b/components/autofill/core/browser/webdata/web_data_model_type_controller.cc
@@ -0,0 +1,36 @@
+// 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.
+
+#include "components/autofill/core/browser/webdata/web_data_model_type_controller.h"
+
+#include "base/bind.h"
+#include "base/bind_helpers.h"
+
+using syncer::ModelType;
+using syncer::ModelTypeController;
+using syncer::SyncClient;
+
+namespace autofill {
+
+WebDataModelTypeController::WebDataModelTypeController(
+ ModelType type,
+ SyncClient* sync_client,
+ const scoped_refptr<base::SingleThreadTaskRunner>& model_thread,
+ const scoped_refptr<AutofillWebDataService>& web_data_service,
+ const BridgeFromWebData& bridge_from_web_data)
+ : ModelTypeController(type, sync_client, model_thread),
+ web_data_service_(web_data_service),
+ bridge_from_web_data_(bridge_from_web_data) {}
+
+WebDataModelTypeController::~WebDataModelTypeController() {}
+
+ModelTypeController::BridgeProvider
+WebDataModelTypeController::GetBridgeProvider() {
+ // As opposed to the default implementation, get the bridge on demand, the web
+ // data service requires us to be on the model thread.
+ return base::Bind(bridge_from_web_data_,
+ base::RetainedRef(web_data_service_));
+}
+
+} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698