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

Side by Side Diff: components/autofill/core/browser/webdata/autofill_profile_data_type_controller.cc

Issue 2799653006: Revert of [Sync] Stop accessing BrowserContextKeyedServiceFactory on non-UI thread. (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #include "components/autofill/core/browser/webdata/autofill_profile_data_type_co ntroller.h" 5 #include "components/autofill/core/browser/webdata/autofill_profile_data_type_co ntroller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 10 matching lines...) Expand all
21 AutofillProfileDataTypeController::AutofillProfileDataTypeController( 21 AutofillProfileDataTypeController::AutofillProfileDataTypeController(
22 scoped_refptr<base::SingleThreadTaskRunner> db_thread, 22 scoped_refptr<base::SingleThreadTaskRunner> db_thread,
23 const base::Closure& dump_stack, 23 const base::Closure& dump_stack,
24 syncer::SyncClient* sync_client, 24 syncer::SyncClient* sync_client,
25 const scoped_refptr<autofill::AutofillWebDataService>& web_data_service) 25 const scoped_refptr<autofill::AutofillWebDataService>& web_data_service)
26 : AsyncDirectoryTypeController(syncer::AUTOFILL_PROFILE, 26 : AsyncDirectoryTypeController(syncer::AUTOFILL_PROFILE,
27 dump_stack, 27 dump_stack,
28 sync_client, 28 sync_client,
29 syncer::GROUP_DB, 29 syncer::GROUP_DB,
30 std::move(db_thread)), 30 std::move(db_thread)),
31 sync_client_(sync_client),
31 web_data_service_(web_data_service), 32 web_data_service_(web_data_service),
32 callback_registered_(false) {} 33 callback_registered_(false) {}
33 34
34 void AutofillProfileDataTypeController::WebDatabaseLoaded() { 35 void AutofillProfileDataTypeController::WebDatabaseLoaded() {
35 DCHECK(CalledOnValidThread()); 36 DCHECK(CalledOnValidThread());
36 OnModelLoaded(); 37 OnModelLoaded();
37 } 38 }
38 39
39 void AutofillProfileDataTypeController::OnPersonalDataChanged() { 40 void AutofillProfileDataTypeController::OnPersonalDataChanged() {
40 DCHECK(CalledOnValidThread()); 41 DCHECK(CalledOnValidThread());
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 86
86 return false; 87 return false;
87 } 88 }
88 89
89 void AutofillProfileDataTypeController::StopModels() { 90 void AutofillProfileDataTypeController::StopModels() {
90 DCHECK(CalledOnValidThread()); 91 DCHECK(CalledOnValidThread());
91 sync_client_->GetPersonalDataManager()->RemoveObserver(this); 92 sync_client_->GetPersonalDataManager()->RemoveObserver(this);
92 } 93 }
93 94
94 } // namespace browser_sync 95 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698