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

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

Issue 25870002: Abstract BrowserThread knowledge out of AutofillWebDataService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix up test constructor Created 7 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/webdata/autofill_webdata_service.h
diff --git a/components/autofill/core/browser/webdata/autofill_webdata_service.h b/components/autofill/core/browser/webdata/autofill_webdata_service.h
index 59907fd13d052727bbbf0f07e6bbfe949b46d5b9..34a10800364d0ab206cc19822d20f3dc231be313 100644
--- a/components/autofill/core/browser/webdata/autofill_webdata_service.h
+++ b/components/autofill/core/browser/webdata/autofill_webdata_service.h
@@ -20,6 +20,10 @@
class WebDatabaseService;
+namespace base {
+class MessageLoopProxy;
+}
+
namespace content {
class BrowserContext;
}
@@ -38,9 +42,11 @@ class CreditCard;
class AutofillWebDataService : public AutofillWebData,
public WebDataServiceBase {
public:
- AutofillWebDataService();
-
+ AutofillWebDataService(scoped_refptr<base::MessageLoopProxy> ui_thread,
Jói 2013/10/03 16:33:55 const scoped_refptr<...>& here and following lines
blundell 2013/10/03 16:43:33 isherman@ advised me the other way on a CL yesterd
+ scoped_refptr<base::MessageLoopProxy> db_thread);
AutofillWebDataService(scoped_refptr<WebDatabaseService> wdbs,
+ scoped_refptr<base::MessageLoopProxy> ui_thread,
+ scoped_refptr<base::MessageLoopProxy> db_thread,
const ProfileErrorCallback& callback);
// Retrieve an AutofillWebDataService for the given context.
@@ -112,6 +118,12 @@ class AutofillWebDataService : public AutofillWebData,
private:
ObserverList<AutofillWebDataServiceObserverOnUIThread> ui_observer_list_;
+ // The MessageLoopProxy that this class uses as its UI thread.
+ scoped_refptr<base::MessageLoopProxy> ui_thread_;
+
+ // The MessageLoopProxy that this class uses as its DB thread.
+ scoped_refptr<base::MessageLoopProxy> db_thread_;
+
// This factory is used on the UI thread. All vended weak pointers are
// invalidated in ShutdownOnUIThread().
base::WeakPtrFactory<AutofillWebDataService> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698