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

Side by Side Diff: components/autofill/core/browser/webdata/autofill_data_type_controller.h

Issue 2549223003: [Sync] Rename NonUIDataTypeController to AsyncDirectoryTypeController (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_DATA_TYPE_CONTROLLER_H __ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_DATA_TYPE_CONTROLLER_H __
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_DATA_TYPE_CONTROLLER_H __ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_DATA_TYPE_CONTROLLER_H __
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/gtest_prod_util.h" 11 #include "base/gtest_prod_util.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "components/sync/driver/non_ui_data_type_controller.h" 14 #include "components/sync/driver/async_directory_type_controller.h"
15 15
16 namespace autofill { 16 namespace autofill {
17 class AutofillWebDataService; 17 class AutofillWebDataService;
18 } // namespace autofill 18 } // namespace autofill
19 19
20 namespace browser_sync { 20 namespace browser_sync {
21 21
22 // A class that manages the startup and shutdown of autofill sync. 22 // A class that manages the startup and shutdown of autofill sync.
23 class AutofillDataTypeController : public syncer::NonUIDataTypeController { 23 class AutofillDataTypeController : public syncer::AsyncDirectoryTypeController {
24 public: 24 public:
25 // |dump_stack| is called when an unrecoverable error occurs. 25 // |dump_stack| is called when an unrecoverable error occurs.
26 AutofillDataTypeController( 26 AutofillDataTypeController(
27 scoped_refptr<base::SingleThreadTaskRunner> db_thread, 27 scoped_refptr<base::SingleThreadTaskRunner> db_thread,
28 const base::Closure& dump_stack, 28 const base::Closure& dump_stack,
29 syncer::SyncClient* sync_client, 29 syncer::SyncClient* sync_client,
30 const scoped_refptr<autofill::AutofillWebDataService>& web_data_service); 30 const scoped_refptr<autofill::AutofillWebDataService>& web_data_service);
31 ~AutofillDataTypeController() override; 31 ~AutofillDataTypeController() override;
32 32
33 protected: 33 protected:
34 // NonUIDataTypeController implementation. 34 // AsyncDirectoryTypeController implementation.
35 bool StartModels() override; 35 bool StartModels() override;
36 36
37 private: 37 private:
38 friend class AutofillDataTypeControllerTest; 38 friend class AutofillDataTypeControllerTest;
39 FRIEND_TEST_ALL_PREFIXES(AutofillDataTypeControllerTest, StartWDSReady); 39 FRIEND_TEST_ALL_PREFIXES(AutofillDataTypeControllerTest, StartWDSReady);
40 FRIEND_TEST_ALL_PREFIXES(AutofillDataTypeControllerTest, StartWDSNotReady); 40 FRIEND_TEST_ALL_PREFIXES(AutofillDataTypeControllerTest, StartWDSNotReady);
41 41
42 // Callback once WebDatabase has loaded. 42 // Callback once WebDatabase has loaded.
43 void WebDatabaseLoaded(); 43 void WebDatabaseLoaded();
44 44
45 // A reference to the AutofillWebDataService for this controller. 45 // A reference to the AutofillWebDataService for this controller.
46 scoped_refptr<autofill::AutofillWebDataService> web_data_service_; 46 scoped_refptr<autofill::AutofillWebDataService> web_data_service_;
47 47
48 DISALLOW_COPY_AND_ASSIGN(AutofillDataTypeController); 48 DISALLOW_COPY_AND_ASSIGN(AutofillDataTypeController);
49 }; 49 };
50 50
51 } // namespace browser_sync 51 } // namespace browser_sync
52 52
53 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_DATA_TYPE_CONTROLLE R_H__ 53 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOFILL_DATA_TYPE_CONTROLLE R_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698