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

Unified Diff: components/autofill/core/browser/autofill_wallet_data_type_controller.h

Issue 1373573003: [Sync] Componentize AutofillWalletDataTypeController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missing gyp dep. Created 5 years, 2 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/autofill_wallet_data_type_controller.h
diff --git a/chrome/browser/sync/glue/autofill_wallet_data_type_controller.h b/components/autofill/core/browser/autofill_wallet_data_type_controller.h
similarity index 74%
rename from chrome/browser/sync/glue/autofill_wallet_data_type_controller.h
rename to components/autofill/core/browser/autofill_wallet_data_type_controller.h
index f67ba59711c567f4fbe474ef093e0f5111a992bd..b24f3b38100181dec6478e5c3b247bdf675643d5 100644
--- a/chrome/browser/sync/glue/autofill_wallet_data_type_controller.h
+++ b/components/autofill/core/browser/autofill_wallet_data_type_controller.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SYNC_GLUE_AUTOFILL_WALLET_DATA_TYPE_CONTROLLER_H_
-#define CHROME_BROWSER_SYNC_GLUE_AUTOFILL_WALLET_DATA_TYPE_CONTROLLER_H_
+#ifndef COMPONENTS_SYNC_DRIVER_GLUE_AUTOFILL_WALLET_DATA_TYPE_CONTROLLER_H_
+#define COMPONENTS_SYNC_DRIVER_GLUE_AUTOFILL_WALLET_DATA_TYPE_CONTROLLER_H_
#include "base/basictypes.h"
#include "base/prefs/pref_change_registrar.h"
@@ -17,6 +17,9 @@ class AutofillWalletDataTypeController
public:
// |model_type| should be either AUTOFILL_WALLET or AUTOFILL_WALLET_METADATA.
AutofillWalletDataTypeController(
+ const scoped_refptr<base::SingleThreadTaskRunner>& ui_thread,
+ const scoped_refptr<base::SingleThreadTaskRunner>& db_thread,
+ const base::Closure& error_callback,
sync_driver::SyncClient* sync_client,
syncer::ModelType model_type);
@@ -41,6 +44,12 @@ class AutofillWalletDataTypeController
// Returns true if the prefs are set such that wallet sync should be enabled.
bool IsEnabled();
+ // A reference to the UI thread's task runner.
+ const scoped_refptr<base::SingleThreadTaskRunner> ui_thread_;
+
+ // A reference to the DB thread's task runner.
+ const scoped_refptr<base::SingleThreadTaskRunner> db_thread_;
+
sync_driver::SyncClient* const sync_client_;
bool callback_registered_;
syncer::ModelType model_type_;
@@ -57,4 +66,4 @@ class AutofillWalletDataTypeController
} // namespace browser_sync
-#endif // CHROME_BROWSER_SYNC_GLUE_AUTOFILL_WALLET_DATA_TYPE_CONTROLLER_H_
+#endif // COMPONENTS_SYNC_DRIVER_GLUE_AUTOFILL_WALLET_DATA_TYPE_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698